Re: [PATCH] usb: Convert pr_warning to pr_warn

2016-09-28 Thread Nicolas Ferre
Le 27/09/2016 à 18:16, Joe Perches a écrit : > Use the more common logging mechanism. > > Miscellanea: > > o Realign multiline statements > o Coalesce format > > Signed-off-by: Joe Perches > --- > drivers/usb/gadget/function/rndis.c | 9 - > drivers/usb/gadget/function/u_serial.c

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Felipe Balbi
Hi, Felipe Balbi writes: > Hi, > > Bin Liu writes: >>> > >> > Does this mean the issue of isoc high bandwidth transfer was fixed by >>> > >> > this patchset per your test? >>> > >> >>> > >> No, I couldn't get g_webcam to work yet. >>> > > >>> > > In mainline, g_webcam is broken with DWC3. Also

[PATCH v1] usb: ohci-at91: Use descriptor-based gpio APIs

2016-09-28 Thread Wenyou Yang
Use the descriptor-based interface to manipulate GPIOs, instead of the legacy integer-based interface. In the meanwhile, remove unneeded vbus_pin_active_low[...] member. Signed-off-by: Wenyou Yang --- drivers/usb/host/ohci-at91.c | 120 ++- 1 file change

[RESEND PATCH v1] usb: ohci-at91: Use descriptor-based gpio APIs

2016-09-28 Thread Wenyou Yang
Use the descriptor-based interface to manipulate GPIOs, instead of the legacy integer-based interface. In the meanwhile, remove unneeded vbus_pin_active_low[...] member. Signed-off-by: Wenyou Yang --- drivers/usb/host/ohci-at91.c | 120 ++- 1 file change

[PATCH v1] usb: ohci-at91: Use descriptor-based gpio APIs

2016-09-28 Thread Wenyou Yang
Use the descriptor-based interface to manipulate GPIOs, instead of the legacy integer-based interface. In the meanwhile, remove unneeded vbus_pin_active_low[...] member. Signed-off-by: Wenyou Yang --- drivers/usb/host/ohci-at91.c | 120 ++- 1 file change

Re: [PATCH 1/1] ARM: dma: fix dma_max_pfn()

2016-09-28 Thread Roger Quadros
Hi, On 12/09/16 14:38, Roger Quadros wrote: > Hi Santosh & Russell, > > On 19/08/16 19:38, Santosh Shilimkar wrote: >> >> On 8/19/2016 12:30 AM, Roger Quadros wrote: >>> Hi Santosh, >>> >> > So I'm 99.9% convinced that the proposed change is correct. > I will got with that then :-) a

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
Hi Felipe, On 2016/9/28 15:37, Felipe Balbi wrote: Hi, Felipe Balbi writes: Hi, Bin Liu writes: Does this mean the issue of isoc high bandwidth transfer was fixed by this patchset per your test? No, I couldn't get g_webcam to work yet. In mainline, g_webcam is broken with DWC3. Also t

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Felipe Balbi
Hi, yfw writes: >>> Bin Liu writes: > Does this mean the issue of isoc high bandwidth transfer was fixed by > this patchset per your test? No, I couldn't get g_webcam to work yet. >>> >>> In mainline, g_webcam is broken with DWC3. Also these two patches

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
Hi Felipe, On 2016/9/28 16:05, Felipe Balbi wrote: Hi, yfw writes: Bin Liu writes: Does this mean the issue of isoc high bandwidth transfer was fixed by this patchset per your test? No, I couldn't get g_webcam to work yet. In mainline, g_webcam is broken with DWC3. Also these two patch

Re: USB hot-plug not working (ASUS TP301UA-C4028T)

2016-09-28 Thread Pierre de Villemereuil
Hi! Here you are. - On battery: 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) (prog-if 30 [XHCI]) Subsystem: ASUSTeK Computer Inc. Device 201f Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB

Re: [PATCH 1/1] ARM: dma: fix dma_max_pfn()

2016-09-28 Thread Russell King - ARM Linux
On Wed, Sep 28, 2016 at 10:53:49AM +0300, Roger Quadros wrote: > Hi, > > On 12/09/16 14:38, Roger Quadros wrote: > > Hi Santosh & Russell, > > > > On 19/08/16 19:38, Santosh Shilimkar wrote: > >> > >> On 8/19/2016 12:30 AM, Roger Quadros wrote: > >>> Hi Santosh, > >>> > >> > > So I'm 99.9% co

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-09-28 Thread Oliver Neukum
On Tue, 2016-09-27 at 18:34 +0200, Wim Osterholt wrote: > On Thu, Sep 22, 2016 at 04:40:50PM +0200, Oliver Neukum wrote: > > > > dmesg -c > > echo 9 > /proc/sysrq-trigger > > modprobe cdc_acm > > echo "module cdc_acm +mpf" > /sys/kernel/debug/dynamic_debug/control > > > > [plug your device in] >

Re: usbtmc: vendor specific i/o

2016-09-28 Thread Greg Kroah-Hartman
On Wed, Sep 28, 2016 at 08:38:07AM +0200, Ladislav Michl wrote: > On Thu, Aug 04, 2016 at 10:15:33PM +0200, Ladislav Michl wrote: > > On Thu, Aug 04, 2016 at 06:59:30AM +0200, Greg Kroah-Hartman wrote: > > > On Wed, Aug 03, 2016 at 09:06:25AM +0200, Ladislav Michl wrote: > > > > Yes, also was lacki

Re: BUG: scheduling while atomic in f_fs when gadget remove driver

2016-09-28 Thread Chen Yu
Hi, 在 2016/9/27 18:01, Felipe Balbi 写道: > > Hi, > > Chen Yu writes: >> Hi All, >> >> I'm working on Hikey board based around the HiSilicon Kirin 620, with >> linaro kernel version 4.8.rc1 and I get below BUG error while >> extracting USB cable from PC. > > which peripheral controller does this

Re: usbtmc: vendor specific i/o

2016-09-28 Thread Ladislav Michl
On Wed, Sep 28, 2016 at 11:45:02AM +0200, Greg Kroah-Hartman wrote: > If it is freed, why is a read even able to happen? Ah, ick, no proper > reference counting is happening here :( > > Oh, no, wait, it is happening properly, it's just that it's not the > lifespan that the devm_kzalloc() is attac

Re: Strange behavior of CHN bit with dwc3

2016-09-28 Thread mgautam
On 2016-09-27 20:31, yfw wrote: I set the MaxPacketSize to 0x1400 so the host could allocate 3072 bytes for uframe. But when I chain three trbs together, the dwc3 behavior is quite weird: Why are you using three TRBs for one service interval? Is the data not contiguous? Since, in your case all

Re: usbtmc: vendor specific i/o

2016-09-28 Thread Oliver Neukum
On Wed, 2016-09-28 at 12:29 +0200, Ladislav Michl wrote: > Well, reference counting is also suspicious as kref_get(&data->kref) > in > probe function with comment "will reference data in int urb" gives no > clue why there's explicit reference. Also what if we add classic > error unwinding and leave

Re: usbtmc: vendor specific i/o

2016-09-28 Thread Greg Kroah-Hartman
On Wed, Sep 28, 2016 at 12:29:35PM +0200, Ladislav Michl wrote: > On Wed, Sep 28, 2016 at 11:45:02AM +0200, Greg Kroah-Hartman wrote: > > If it is freed, why is a read even able to happen? Ah, ick, no proper > > reference counting is happening here :( > > > > Oh, no, wait, it is happening properl

[RFC/PATCH 00/45] usb: fixup usb_endpoint_maxp()

2016-09-28 Thread Felipe Balbi
Hi folks, while working on some recent problesm with dwc3 and high-speed, high-bandwidth periodic endpoints, we found this old problem with usb_endpoint_maxp() where it returns wMaxPacketSize completely, not only the lowest 11 bits. This series tries to solve that by introducing a new usb_endpoin

[RFC/PATCH 01/45] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Felipe Balbi
According to USB Specification 2.0 table 9-4, wMaxPacketSize is a bitfield. Endpoint's maxpacket is laid out in bits 10:0. For high-speed, high-bandwidth isochronous endpoints, bits 12:11 contain a multiplier to tell us how many transactions we want to try per uframe. This means that if we want an

[RFC/PATCH 09/45] usb: dwc3: debug: decode control endpoint phase too

2016-09-28 Thread Felipe Balbi
DWC3 can tell us which phase of a setup transfer we're getting into. Let's decode it from the event to make it easier to debug. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/debug.h | 13 + 2 files changed, 14 insertions(+) diff --git a/drivers/us

[RFC/PATCH 03/45] usb: gadget: composite: always set ep->mult to a sensible value

2016-09-28 Thread Felipe Balbi
ep->mult is supposed to be set to Isochronous and Interrupt Endapoint's multiplier value. This value is computed from different places depending on the link speed. If we're dealing with HighSpeed, then it's part of bits [12:11] of wMaxPacketSize. This case wasn't taken into consideration before.

[RFC/PATCH 14/45] media: usb: uvc: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Signed-off-by: Felipe Balbi --- drivers/media/usb/uvc/uvc_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/me

[RFC/PATCH 17/45] usb: gadget: udc: atmel: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Nicolas Ferre Cc: Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/atmel_usba_udc

[RFC/PATCH 04/45] usb: dwc3: gadget: set PCM1 field of isochronous-first TRBs

2016-09-28 Thread Felipe Balbi
In case of High-Speed, High-Bandwidth endpoints, we need to tell DWC3 that we have more than one packet per interval. We do that by setting PCM1 field of Isochronous-First TRB. Cc: Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 13 +++-- 1 file changed, 11 insertions(+), 2

[RFC/PATCH 19/45] usb: gadget: udc: dummy: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Alan Stern Cc: Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/dummy_hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drive

[RFC/PATCH 15/45] usb: chipidea: udc: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Peter Chen Cc: Signed-off-by: Felipe Balbi --- drivers/usb/chipidea/udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc

[RFC/PATCH 02/45] usb: gadget: composite: correctly initialize ep->maxpacket

2016-09-28 Thread Felipe Balbi
usb_endpoint_maxp() returns wMaxPacketSize in its raw form. Without taking into consideration that it also contains other bits reserved for isochronous endpoints. This patch fixes one occasion where this is a problem by making sure that we initialize ep->maxpacket only with lower 10 bits of the va

[RFC/PATCH 16/45] usb: core: devices: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Greg Kroah-Hartman Cc: Signed-off-by: Felipe Balbi --- drivers/usb/core/devices.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/usb/core/devices.c b/drive

[RFC/PATCH 18/45] usb: gadget: udc: bdc: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Ashwini Pahuja Cc: Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/bdc/bdc_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_cmd.c b

[RFC/PATCH 05/45] usb: dwc3: gadget: properly check ep cmd

2016-09-28 Thread Felipe Balbi
The cmd argument we pass to dwc3_send_gadget_ep_cmd() could contain extra arguments embedded. When checking for StartTransfer command, we need to make sure to match only lower 4 bits which contain the actual command and ignore the rest. Reported-by: Janusz Dziedzic Signed-off-by: Felipe Balbi --

[RFC/PATCH 13/45] media: usbtv: core: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Mauro Carvalho Chehab Cc: Signed-off-by: Felipe Balbi --- drivers/media/usb/usbtv/usbtv-core.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/usbtv/u

[RFC/PATCH 10/45] usb: dwc3: gadget: remove redundant trace prints

2016-09-28 Thread Felipe Balbi
Removing some trace prints which were made redundant when we started decoding events and TRBs completely within their respective trace points. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/ep0.c| 17 + drivers/usb/dwc3/gadget.c | 43 +---

[RFC/PATCH 11/45] usb: dwc3: debug: move dwc3_ep0_state_string() to debug.h

2016-09-28 Thread Felipe Balbi
We will be using dwc3_ep0_state_string() from within our tracepoints, so we need to move that helper to debug.h in order for it to be accessible. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debug.h | 16 drivers/usb/dwc3/ep0.c | 16 2 files changed, 16 in

[RFC/PATCH 06/45] usb: dwc3: gadget: make use of No Response Update Transfer

2016-09-28 Thread Felipe Balbi
No Response Update Transfer is a special type of Update Transfer command which can be used whenever we're not relying on XferNotReady to prepare transfers. With this, we don't need to wait for CMDACT to be cleared and issue further commands to the endpoint straight away. Let's start using this ver

[RFC/PATCH 07/45] usb: dwc3: gadget: giveback request if we can't kick it

2016-09-28 Thread Felipe Balbi
There might be situations where a Start Transfer command might fail, if that ever happens, instead of simply removing the request from our list, we should give the request back to the gadget driver, otherwise we might eventually starve it from requests. Signed-off-by: Felipe Balbi --- drivers/us

[RFC/PATCH 40/45] usb: gadget: udc: s3c2410: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/s3c2410_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/s3

[RFC/PATCH 24/45] usb: host: ehci: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Alan Stern Cc: Signed-off-by: Felipe Balbi --- drivers/usb/host/ehci-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/e

[RFC/PATCH 35/45] usb: gadget: udc: atmel: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Nicolas Ferre Cc: Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[RFC/PATCH 32/45] usb: core: devices: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Greg Kroah-Hartman Cc: Signed-off-by: Felipe Balbi --- drivers/usb/core/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/us

[RFC/PATCH 36/45] usb: gadget: udc: bdc: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Ashwini Pahuja Cc: Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[RFC/PATCH 37/45] usb: gadget: udc: dummy: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Alan Stern Cc: Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/dummy_hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/us

[RFC/PATCH 34/45] usb: gadget: composite: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/composite.c b/dr

[RFC/PATCH 23/45] usb: gadget: udc: mv_udc: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/mv_udc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/m

[RFC/PATCH 45/45] usb: dwc3: trace: pretty print high-bandwidth transfers too

2016-09-28 Thread Felipe Balbi
In case of periodic transfers, let's pretty print the size field as a multiplier followed by length, such as : 3x 1024 instead of: 33555456 Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/trace.h | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-)

[RFC/PATCH 28/45] usb: ch9: make usb_endpoint_maxp() return only packet size

2016-09-28 Thread Felipe Balbi
Now that we have a helper to gather periodic endpoints' multiplier bits from wMaxPacketSize and every driver is using it, we can safely make sure that usb_endpoint_maxp() returns only bits 10:0 of wMaxPacketSize which is where the actual packet size lies. Signed-off-by: Felipe Balbi --- include/

[RFC/PATCH 39/45] usb: gadget: udc: net2280: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/net2280.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/net2

[RFC/PATCH 31/45] usb: chipidea: udc: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Peter Chen Cc: Signed-off-by: Felipe Balbi --- drivers/usb/chipidea/udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipid

[RFC/PATCH 26/45] usb: misc: usbtest: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Signed-off-by: Felipe Balbi --- drivers/usb/misc/usbtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 5c8210dc

[RFC/PATCH 12/45] usb: dwc3: trace: print out ep0state also from XferComplete

2016-09-28 Thread Felipe Balbi
With this extra piece of information, it will be easier to find mismatches between driver and HW. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debug.h | 11 --- drivers/usb/dwc3/ep0.c| 4 drivers/usb/dwc3/gadget.c | 2 +- drivers/usb/dwc3/trace.h | 12 +++- 4 fil

[RFC/PATCH 30/45] media: usb: uvc: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Signed-off-by: Felipe Balbi --- drivers/media/usb/uvc/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[RFC/PATCH 29/45] usb: host: xhci: purge GET_MAX_PACKET()

2016-09-28 Thread Felipe Balbi
usb_endpoint_maxp() is now returning maxpacket correctly - iow only bits 10:0. We can finaly remove XHCI's private GET_MAX_PACKET macro. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-mem.c | 4 ++-- drivers/usb/host/xhci-mtk-sch.c | 4 ++-- drivers/usb/host/xhci-ring.c| 6 +++---

[RFC/PATCH 27/45] usb: musb: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Bin Liu Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_gadget.c | 6 +++--- drivers/usb/musb/musb_host.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb

[RFC/PATCH 41/45] usb: misc: usbtest: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi --- drivers/usb/misc/usbtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/misc/usbtest.c b/drivers/us

[RFC/PATCH 43/45] usb: gadget: udc: fsl: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Li Yang Cc: Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/fsl_udc_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/udc/fsl_

[RFC/PATCH 44/45] usb: gadget: udc: mv: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/mv_udc_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/driver

[RFC/PATCH 33/45] usb: core: endpoint: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Greg Kroah-Hartman Signed-off-by: Felipe Balbi --- drivers/usb/core/endpoint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/

[RFC/PATCH 42/45] usb: ip: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Valentina Manea Cc: Shuah Khan Cc: Signed-off-by: Felipe Balbi --- drivers/usb/usbip/vudc_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[RFC/PATCH 38/45] usb: gadget: udc: net2272: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/net2272.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/net227

[RFC/PATCH 08/45] usb: dwc3: gadget: conditionally disable Link State change events

2016-09-28 Thread Felipe Balbi
Link State Change events are only needed for debugging and to apply certain workarounds on known errata. Let's save a few cycles by disabling these events completely on working revisions of the core. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 4 +++- 1 file changed, 3 insertions

[RFC/PATCH 25/45] usb: host: xhci: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Mathias Nyman Cc: Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/h

[RFC/PATCH 22/45] usb: gadget: udc: gr: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/gr_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c ind

[RFC/PATCH 21/45] usb: gadget: udc: fusb300: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/fusb300_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/f

[RFC/PATCH 20/45] usb: gadget: udc: fsl: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Li Yang Cc: Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/fsl_udc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/driv

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Bin Liu
On Wed, Sep 28, 2016 at 11:05:30AM +0300, Felipe Balbi wrote: > > Hi, > > yfw writes: > >>> Bin Liu writes: > > Does this mean the issue of isoc high bandwidth transfer was fixed > > by > > this patchset per your test? > > No, I couldn't get g_webcam t

Re: USB hot-plug not working (ASUS TP301UA-C4028T)

2016-09-28 Thread Mathias Nyman
On 28.09.2016 11:43, Pierre de Villemereuil wrote: Hi! Here you are. Thanks - On battery: 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) (prog-if 30 [XHCI]) Status: D0 NoSoftRst+ PME-Enable+ DSel=0 DScale=0 PME- I was expecti

Re: [RFC/PATCH 03/45] usb: gadget: composite: always set ep->mult to a sensible value

2016-09-28 Thread Sergei Shtylyov
Hello. On 09/28/2016 04:05 PM, Felipe Balbi wrote: ep->mult is supposed to be set to Isochronous and Interrupt Endapoint's multiplier value. This value is computed from different places depending on the link speed. If we're dealing with HighSpeed, then it's part of bits [12:11] of wMaxPacketSi

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Bin Liu
On Wed, Sep 28, 2016 at 10:03:16PM +0800, yfw wrote: [snip] > >> > >>it'll be 1024 * (mult + 1). Hmm, mult isn't set for highspeed isoc > >>endpoints. So here you go: > > > >Great! all the 4 patches you sent so far fix the issue on v4.4.21 tag! > >Now I see 3 1024-bytes transactions in each SOF.

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
On 2016/9/28 21:35, Bin Liu wrote: On Wed, Sep 28, 2016 at 11:05:30AM +0300, Felipe Balbi wrote: Hi, yfw writes: Bin Liu writes: Does this mean the issue of isoc high bandwidth transfer was fixed by this patchset per your test? No, I couldn't get g_webcam to work yet. In mainline, g_

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Felipe Balbi
Hi, Bin Liu writes: >> > uvc_video set the each request size (you could check function >> > uvc_video_alloc_requests()) for uvc: >> > req_size = video->ep->maxpacket >> > * max_t(unsigned int, video->ep->maxburst, 1) >> > * (video->ep->mult + 1); >> >

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
Hi Felipe, On 2016/9/28 22:15, Felipe Balbi wrote: Hi, Bin Liu writes: uvc_video set the each request size (you could check function uvc_video_alloc_requests()) for uvc: req_size = video->ep->maxpacket * max_t(unsigned int, video->ep->maxburst, 1)

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Felipe Balbi
Hi, yfw writes: Does this mean the issue of isoc high bandwidth transfer was fixed by this patchset per your test? >>> >>> No, I couldn't get g_webcam to work yet. >> >> In mainline, g_webcam is broken with DWC3. Also these

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
On 2016/9/28 22:08, Bin Liu wrote: On Wed, Sep 28, 2016 at 10:03:16PM +0800, yfw wrote: [snip] it'll be 1024 * (mult + 1). Hmm, mult isn't set for highspeed isoc endpoints. So here you go: Great! all the 4 patches you sent so far fix the issue on v4.4.21 tag! Now I see 3 1024-bytes transac

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
Hi Felipe, On 2016/9/28 22:22, Felipe Balbi wrote: Hi, yfw writes: Does this mean the issue of isoc high bandwidth transfer was fixed by this patchset per your test? No, I couldn't get g_webcam to work yet. In mainline, g_webcam is broken with DWC3. Also these two patches don't fix the i

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Felipe Balbi
Hi, yfw writes: > Hi Felipe, > > On 2016/9/28 22:15, Felipe Balbi wrote: >> >> Hi, >> >> Bin Liu writes: > uvc_video set the each request size (you could check function > uvc_video_alloc_requests()) for uvc: > req_size = video->ep->maxpacket > * max_t(

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
Hi Felipe, On 2016/9/26 16:12, Felipe Balbi wrote: According to USB Specification 2.0 table 9-4, wMaxPacketSize is a bitfield. Endpoint's maxpacket is laid out in bits 10:0. For high-speed, high-bandwidth isochronous endpoints, bits 12:11 contain a multiplier to tell us how many transactions we

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
On 2016/9/28 22:25, Felipe Balbi wrote: Hi, yfw writes: Hi Felipe, On 2016/9/28 22:15, Felipe Balbi wrote: Hi, Bin Liu writes: uvc_video set the each request size (you could check function uvc_video_alloc_requests()) for uvc: req_size = video->ep->maxpacket

Re: [PATCH 2/2] usb: dwc3: gadget: set PCM1 field of isochronous-first TRBs

2016-09-28 Thread yfw
On 2016/9/26 16:12, Felipe Balbi wrote: In case of High-Speed, High-Bandwidth endpoints, we need to tell DWC3 that we have more than one packet per interval. We do that by setting PCM1 field of Isochronous-First TRB. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 14

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Bin Liu
On Wed, Sep 28, 2016 at 10:13:00PM +0800, yfw wrote: > > On 2016/9/28 22:08, Bin Liu wrote: > >On Wed, Sep 28, 2016 at 10:03:16PM +0800, yfw wrote: > > > >[snip] > > > > it'll be 1024 * (mult + 1). Hmm, mult isn't set for highspeed isoc > endpoints. So here you go: > >>> > >>>Great! a

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
Hi Bin, On 2016/9/28 22:40, Bin Liu wrote: On Wed, Sep 28, 2016 at 10:13:00PM +0800, yfw wrote: On 2016/9/28 22:08, Bin Liu wrote: On Wed, Sep 28, 2016 at 10:03:16PM +0800, yfw wrote: [snip] it'll be 1024 * (mult + 1). Hmm, mult isn't set for highspeed isoc endpoints. So here you go: Gr

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-09-28 Thread Wim Osterholt
On Wed, Sep 28, 2016 at 11:16:04AM +0200, Oliver Neukum wrote: > > Very good. This is a valid oops. We can do two things. When I > decode it, seems to crash in acm_alloc_minor() which does not make > sense. It is likely that our kernels or compilers are a bit different. > Could you please call gdb

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Bin Liu
On Wed, Sep 28, 2016 at 05:22:44PM +0300, Felipe Balbi wrote: > > Hi, > > yfw writes: > Does this mean the issue of isoc high bandwidth transfer was > fixed by > this patchset per your test? > >>> > >>> No, I couldn't get g_webcam to work y

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread yfw
On 2016/9/28 16:05, Felipe Balbi wrote: Hi, yfw writes: Bin Liu writes: Does this mean the issue of isoc high bandwidth transfer was fixed by this patchset per your test? No, I couldn't get g_webcam to work yet. In mainline, g_webcam is broken with DWC3. Also these two patches don't f

Re: [PATCH 1/2] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Bin Liu
On Wed, Sep 28, 2016 at 05:15:59PM +0300, Felipe Balbi wrote: > > Hi, > > Bin Liu writes: > >> > uvc_video set the each request size (you could check function > >> > uvc_video_alloc_requests()) for uvc: > >> > req_size = video->ep->maxpacket > >> > * max_t(unsigned int

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-09-28 Thread Oliver Neukum
On Wed, 2016-09-28 at 17:08 +0200, Wim Osterholt wrote: > On Wed, Sep 28, 2016 at 11:16:04AM +0200, Oliver Neukum wrote: > > this should show you where it crashes. In addition I've attached > > a patch with paranoid debugging. Could you compile and test a kernel > > with it? > > > > Regards >

Re: usbtmc: vendor specific i/o

2016-09-28 Thread Dave Penkler
On Wed, Sep 28, 2016 at 12:29:35PM +0200, Ladislav Michl wrote: > On Wed, Sep 28, 2016 at 11:45:02AM +0200, Greg Kroah-Hartman wrote: > > If it is freed, why is a read even able to happen? Ah, ick, no proper > > reference counting is happening here :( > > > > Oh, no, wait, it is happening properl

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-09-28 Thread Wim Osterholt
On Wed, Sep 28, 2016 at 11:16:04AM +0200, Oliver Neukum wrote: > this should show you where it crashes. In addition I've attached > a patch with paranoid debugging. Could you compile and test a kernel > with it? > > Regards > Oliver If you mean echo "module cdc_acm +mpf" > /

Re: usbtmc: vendor specific i/o

2016-09-28 Thread Greg Kroah-Hartman
On Wed, Sep 28, 2016 at 05:25:42PM +0200, Dave Penkler wrote: > On Wed, Sep 28, 2016 at 12:29:35PM +0200, Ladislav Michl wrote: > > On Wed, Sep 28, 2016 at 11:45:02AM +0200, Greg Kroah-Hartman wrote: > > > If it is freed, why is a read even able to happen? Ah, ick, no proper > > > reference counti

Re: [RFC/PATCH 32/45] usb: core: devices: remove unnecessary & operation

2016-09-28 Thread Greg Kroah-Hartman
On Wed, Sep 28, 2016 at 04:05:41PM +0300, Felipe Balbi wrote: > Now that usb_endpoint_maxp() only returns the lowest > 11 bits from wMaxPacketSize, we can remove the & > operation from this driver. > > Cc: Greg Kroah-Hartman > Cc: > Signed-off-by: Felipe Balbi > --- Acked-by: Greg Kroah-Hartma

Re: [RFC/PATCH 33/45] usb: core: endpoint: remove unnecessary & operation

2016-09-28 Thread Greg Kroah-Hartman
On Wed, Sep 28, 2016 at 04:05:42PM +0300, Felipe Balbi wrote: > Now that usb_endpoint_maxp() only returns the lowest > 11 bits from wMaxPacketSize, we can remove the & > operation from this driver. > > Cc: Greg Kroah-Hartman > Signed-off-by: Felipe Balbi > --- Acked-by: Greg Kroah-Hartman -- T

Re: [RFC/PATCH 16/45] usb: core: devices: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Greg Kroah-Hartman
On Wed, Sep 28, 2016 at 04:05:25PM +0300, Felipe Balbi wrote: > We have introduced a helper to calculate multiplier > value from wMaxPacketSize. Start using it. > > Cc: Greg Kroah-Hartman > Cc: > Signed-off-by: Felipe Balbi > --- Acked-by: Greg Kroah-Hartman -- To unsubscribe from this list:

request for testers

2016-09-28 Thread Oliver Neukum
Hi, does anybody here want to test patches to improve UAS error handling? Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: request for testers

2016-09-28 Thread Greg K-H
On September 28, 2016 5:58:21 PM GMT+02:00, Oliver Neukum wrote: >Hi, > >does anybody here want to test patches to improve UAS error >handling? > Yes. Just send them to the list... -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger

Re: BUG: scheduling while atomic in f_fs when gadget remove driver

2016-09-28 Thread Michal Nazarewicz
On Wed, Sep 28 2016, Chen Yu wrote: > I will try to fix it, but I'm engaged in other tasks and can not spend > much time on it. > > Do you have any suggestions about how to fix it? epfile->ep is protected by ffs->eps_lock which brings us to realisation that there is another bug in the code and we

[PATCH] usbtmc: Add, clarify and fix comments

2016-09-28 Thread Dave Penkler
Add information regarding lifespan of kref protection: Clarify comment on kref_get for interrupt in urb in usbtmc_probe() Add comment on kref_get in usbtmc_open() Fix endpoint reference in documentation for send_request_dev_dep_msg_in() Signed-off-by: Dave Penkler --- drivers/usb/class/us

Re: [PATCHv2] usb: musb: Fix unbalanced platform_disable

2016-09-28 Thread Tony Lindgren
* Tony Lindgren [160920 11:37]: > * Tony Lindgren [160920 10:11]: > > * Laurent Pinchart [160919 23:36]: > > > No, I perform the following steps: > > > > > > - Connect the panda board to the USB through USB (which powers the board > > > on) > > > - Let the board boot over NFS > > > - Log in as

Re: USB hot-plug not working (ASUS TP301UA-C4028T)

2016-09-28 Thread Pierre de Villemereuil
Hi! When entering "cat /sys/bus/pci/devices/\:00\:14.0/power/runtime_status", I got: - on battery: suspended - on AC: active Cheers, Pierre Le mercredi 28 septembre 2016, 16:59:25 NZDT Mathias Nyman a écrit : > On 28.09.2016 11:43, Pierre de Villemereuil wrote: > > Hi! > > > > Here you are

Re: BUG: scheduling while atomic in f_fs when gadget remove driver

2016-09-28 Thread Michal Nazarewicz
On Wed, Sep 28 2016, Michal Nazarewicz wrote: > With that done, the only thing which needs a mutex is > epfile->read_buffer. Perhaps this would do: >8 -- - >From 6416a1065203a39328311f6c58083089efe169aa Mon Sep 17 00:00:00 2001 From

Re: [RFC/PATCH 01/45] usb: add helper to extract bits 12:11 of wMaxPacketSize

2016-09-28 Thread Peter Chen
On Wed, Sep 28, 2016 at 04:05:10PM +0300, Felipe Balbi wrote: > According to USB Specification 2.0 table 9-4, At my 2.0 spec, it is "Table 9-13. Standard Endpoint Descriptor", different revision? > wMaxPacketSize is a bitfield. Endpoint's maxpacket > is laid out in bits 10:0. For high-speed, > hi

Re: request for testers

2016-09-28 Thread Greg K-H
On Wed, Sep 28, 2016 at 06:05:22PM +0200, Greg K-H wrote: > On September 28, 2016 5:58:21 PM GMT+02:00, Oliver Neukum > wrote: > >Hi, > > > >does anybody here want to test patches to improve UAS error > >handling? > > > > Yes. > > Just send them to the list... The linux-usb list to be specific

  1   2   >