Re: [PATCH v2 1/1] uas: remove can_queue set in host template

2016-05-23 Thread Hans de Goede
Hi, On 23-05-16 21:28, tom.t...@gmail.com wrote: From: Tom Yan Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") made qdepth limit set in host template (`.can_queue = MAX_CMNDS`) redundant. Removing it to avoid confusion. Signed-off-by: Tom Yan I agree removing this is

Re: [PATCH] USB: uas: Fix slave queue_depth not being set

2016-05-23 Thread Hans de Goede
Hi, On 23-05-16 19:36, James Bottomley wrote: On Mon, 2016-05-23 at 13:49 +0200, Hans de Goede wrote: Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") removed the scsi_change_queue_depth() call from uas_slave_configure() assuming that the slave would inherit the host's queu

[PATCH 2/2] usb: dwc2: gadget: Do not halt isochronous endpoints

2016-05-23 Thread John Youn
From: Vahram Aharonyan Add a check in dwc2_hsotg_ep_sethalt() so that it does not halt isochronous endpoints. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb

[PATCH 1/2] usb: dwc2: gadget: Do not halt endpoint if active

2016-05-23 Thread John Youn
From: Vahram Aharonyan The gadget API function usb_ep_set_halt() expects the gadget to return -EAGAIN if the ep is active. Add support for this behavior. Otherwise this may break mass storage protocol if a STALL is attempted on the endpoint. Signed-off-by: Vahram Aharonyan Signed-off-by: John

[PATCH 0/2] usb: dwc2: Fixes for endpoint halt

2016-05-23 Thread John Youn
A couple of small fixes for endpoint halt. This can be queued for 4.7-rc Regards, John Vahram Aharonyan (2): usb: dwc2: gadget: Do not halt endpoint if active usb: dwc2: gadget: Do not halt isochronous endpoints drivers/usb/dwc2/gadget.c | 24 1 file changed, 20 i

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-23 Thread Peter Chen
On Mon, May 23, 2016 at 01:36:51PM +0300, Roger Quadros wrote: > On 23/05/16 13:34, Jun Li wrote: > > Hi > > > >> -Original Message- > >> From: Roger Quadros [mailto:rog...@ti.com] > >> Sent: Monday, May 23, 2016 6:12 PM > >> To: Peter Chen > >> Cc: Jun Li ; peter.c...@freescale.com; ba..

[RFC PATCH 3/5] usb: gadget: f_uac1: drop volume/mute functionality

2016-05-23 Thread Ruslan Bilovol
The volume/mute feature unit was dummy implementation since this driver creation (2009) and never had real volume control or mute functionality. Since it was never implemented, drop it and increase maintainability of the driver. Those who want real volume/mute support may revert this patch and add

[RFC PATCH 2/5] usb: gadget: f_uac2: split out audio core

2016-05-23 Thread Ruslan Bilovol
Abstract the peripheral side ALSA sound card code from the f_uac2 function into a component that can be called by various functions, so the various flavors can be split apart and selectively reused. Visible changes: - add uac_params structure to pass audio paramteres for gaudio_setup - make A

[RFC PATCH 0/5] USB Audio Gadget refactoring

2016-05-23 Thread Ruslan Bilovol
I came to this patch series when wanted to do two things: - use UAC1 as virtual ALSA sound card on gadget side, just like UAC2 is used so it's possible to do rate resampling - have both playback/capture support in UAC1 Since I wanted to have same behavior for both UAC1/UAC2, obviously I've

[RFC PATCH 1/5] usb: gadget: f_uac2: remove platform driver/device creation

2016-05-23 Thread Ruslan Bilovol
Simplify f_uac2 by removing platform driver/device creation; use composite's usb_gadget device as parent for sound card and for debug prints. This removes extra layer of code without any functional change. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c | 107 +

[RFC PATCH 5/5] usb: gadget: f_uac1: add capture support

2016-05-23 Thread Ruslan Bilovol
Add capture support (gadget->host) to the f_uac1 driver. This requires renaming of some descriptors, enums etc that were used exclusively for playback path. To make it meaningful, f_uac2 driver naming convention has been used. By default, capture interface has 48000kHz/2ch configuration, same as p

[RFC PATCH 4/5] usb: gadget: f_uac1: switch to u_audio core utilities

2016-05-23 Thread Ruslan Bilovol
Reuse existing u_audio core utilities making f_uac1 much simpler. This also drops previous f_uac1 approach (write audio samples directly to existing ALSA sound card) and moves to more generic/flexible one - create an f_uac1 ALSA sound card that represents USB Audio function and allows to be used b

Re: [PATCH v9 10/14] usb: otg: add hcd companion support

2016-05-23 Thread Rob Herring
On Fri, May 20, 2016 at 12:32:27PM +0300, Roger Quadros wrote: > Since some host controller (e.g. EHCI) needs a companion host controller > (e.g. OHCI), this patch adds such a configuration to use it in the OTG > core. > > Signed-off-by: Yoshihiro Shimoda > Signed-off-by: Roger Quadros > Acked-b

Re: [PATCH v9 09/14] usb: of: add an API to get OTG device from USB controller node

2016-05-23 Thread Rob Herring
On Fri, May 20, 2016 at 12:29:59PM +0300, Roger Quadros wrote: > The OTG controller and the USB controller can be linked via the > 'otg-controller' property in the USB controller's device node. > > of_usb_get_otg() can be used to get the OTG controller device > from the USB controller's device nod

Re: [PATCH 1/1] net: pegasus: simplify logical constraint

2016-05-23 Thread David Miller
From: Heinrich Schuchardt Date: Wed, 18 May 2016 20:40:51 +0200 > If !count is true, count < 4 is also true. > > Signed-off-by: Heinrich Schuchardt Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majord

[PATCH v2 1/1] uas: remove can_queue set in host template

2016-05-23 Thread tom . ty89
From: Tom Yan Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") made qdepth limit set in host template (`.can_queue = MAX_CMNDS`) redundant. Removing it to avoid confusion. Signed-off-by: Tom Yan diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 4d49f

Re: [PATCH 4/5] usb: dwc3: gadget: Fix truncated cast issue

2016-05-23 Thread Sergei Shtylyov
On 05/23/2016 09:32 PM, John Youn wrote: From sparse: warning: cast truncates bits from constant value (100 becomes 0) The DWC3_TRB_NUM constant is too big for u8. Do the calculation a slightly different way that should still be optimized out for the case where DWC3_TRB_NUM == 256. Signed-off-

Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread James Bottomley
On Tue, 2016-05-24 at 02:33 +0800, Tom Yan wrote: > I don't quite get what you mean. Are you saying that it is impossible > that UAS devices would report inappropriately high qdepth, because of > this? > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/ > drivers/usb/storage/uas

Re: [PATCH] USB: uas: Fix slave queue_depth not being set

2016-05-23 Thread Tom Yan
On 24 May 2016 at 01:36, James Bottomley wrote: > > Are you sure about this? For spinning rust, experiments imply that the > optimal queue depth per device is somewhere between 2 and 4. Obviously > that's not true for SSDs, so it depends on your use case. Are we supposed to care about the stora

Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread Tom Yan
I don't quite get what you mean. Are you saying that it is impossible that UAS devices would report inappropriately high qdepth, because of this? https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/storage/uas.c?h=v4.6#n908 In that case should I send another patch that

[PATCH 5/5] usb: dwc3: Endianness issue on dwc3_log_ctrl

2016-05-23 Thread John Youn
Sparse complains even though it looks ok. Probably it cannot detect that the wValue, wIndex, and wLength are declared __le16 due to the macro magic. Redeclare them as CPU endianness and make the conversion on assignment. Signed-off-by: John Youn --- drivers/usb/dwc3/trace.h | 16 ---

[PATCH 2/5] usb: dwc3: ep0: Use the correct type for SET_SEL data

2016-05-23 Thread John Youn
u2sel and u2pel should be __le16. Doesn't fix any issue. Found with sparse. Signed-off-by: John Youn --- drivers/usb/dwc3/ep0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 9dd4355..169408a 100644 --- a/drivers/usb

[PATCH 0/5] usb: dwc3: Fix sparse issues

2016-05-23 Thread John Youn
This series fixes several issues found with sparse. The first patch in the series is an actual issue. The rest just clean up the warnings. John Youn (5): usb: dwc3: ep0: Fix endianness of wIndex passed to dwc3_wIndex_to_dep usb: dwc3: ep0: Use the correct type for SET_SEL data usb: dwc3: ga

[PATCH 3/5] usb: dwc3: gadget: Fix usage of bitwise operator

2016-05-23 Thread John Youn
Cleans up the sparse warning: warning: dubious: x | !y Since we do want a bitwise OR here, don't use a logical (true/false) value. Probably is not a real issue but it cleans up the warning. Signed-off-by: John Youn --- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/5] usb: dwc3: ep0: Fix endianness of wIndex passed to dwc3_wIndex_to_dep

2016-05-23 Thread John Youn
The wIndex passed in here is CPU endianness, but the function expects little endian. Found with sparse. Signed-off-by: John Youn --- drivers/usb/dwc3/ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 3103a8f..9dd4355

[PATCH 4/5] usb: dwc3: gadget: Fix truncated cast issue

2016-05-23 Thread John Youn
>From sparse: warning: cast truncates bits from constant value (100 becomes 0) The DWC3_TRB_NUM constant is too big for u8. Do the calculation a slightly different way that should still be optimized out for the case where DWC3_TRB_NUM == 256. Signed-off-by: John Youn --- drivers/usb/dwc3/gadget

Re: [PATCH] USB: uas: Fix slave queue_depth not being set

2016-05-23 Thread James Bottomley
On Mon, 2016-05-23 at 13:49 +0200, Hans de Goede wrote: > Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") > removed the scsi_change_queue_depth() call from uas_slave_configure() > assuming that the slave would inherit the host's queue_depth, which > that commit sets to the sam

Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread James Bottomley
On Tue, 2016-05-24 at 01:23 +0800, Tom Yan wrote: > Nothing wrong. It's just .can_queue = MAX_CMNDS in the host template > is no longer neceesary, since with his patch, uas will set can_queue > again later (to devinfo->qdepth - 2). > > Originally I thought .can_queue = MAX_CMNDS can hence be remov

Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread Tom Yan
Nothing wrong. It's just .can_queue = MAX_CMNDS in the host template is no longer neceesary, since with his patch, uas will set can_queue again later (to devinfo->qdepth - 2). Originally I thought .can_queue = MAX_CMNDS can hence be removed; but after a second thought, I think it might probably be

Re: [PATCH v3] input: tablet: add Pegasus Notetaker tablet driver

2016-05-23 Thread Martin Kepplinger
Am 2016-05-23 um 15:00 schrieb Oliver Neukum: > On Mon, 2016-05-23 at 14:43 +0200, Martin Kepplinger wrote: >> Am 2016-05-23 um 14:26 schrieb Oliver Neukum: >>> On Mon, 2016-05-23 at 13:39 +0200, Martin Kepplinger wrote: >>> It's *really* fun to use as an input tablet though! So let's support

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Guenter Roeck
On Mon, May 23, 2016 at 01:25:19PM +0200, Oliver Neukum wrote: > On Mon, 2016-05-23 at 12:57 +0300, Heikki Krogerus wrote: > > Hi Oliver, > > > > On Fri, May 20, 2016 at 04:19:59PM +0200, Oliver Neukum wrote: > > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > > Like I've told so

Re: [PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread Greg KH
On Tue, May 24, 2016 at 12:02:43AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") made > qdepth limit set in host template (`.can_queue = MAX_CMNDS`) useless. > > Instead of removing the template limit, now we only chang

Re: [PATCH V2 2/2] usb: musb: Stop bulk endpoint while queue is rotated

2016-05-23 Thread Sergei Shtylyov
On 05/23/2016 06:19 PM, Andrew Goodbody wrote: Ensure that the endpoint is stopped by clearing REQPKT before clearing DATAERR_NAKTIMEOUT before rotating the queue on the dedicated bulk endpoint. This addresses an issue where a race could result in the endpoint receiving data before it was reprog

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Guenter Roeck
On Mon, May 23, 2016 at 05:55:04PM +0200, Oliver Neukum wrote: > On Mon, 2016-05-23 at 07:43 -0700, Guenter Roeck wrote: > > On 05/23/2016 06:58 AM, Oliver Neukum wrote: > > > > Now I am confused. Are you saying that the choice of Alternate Mode does > > > not belong into user space? > > > > > >

[PATCH] usb: musb: host: correct cppi dma channel for isoch transfer

2016-05-23 Thread Bin Liu
Incorrect cppi dma channel is referenced in musb_rx_dma_iso_cppi41(), which causes kernel NULL pointer reference oops later when calling cppi41_dma_channel_program(). Fixes: 069a3fd (usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part1) Cc: # v4.2+ Reported-by: Matwey V. Kornilov Acke

[PATCH 1/1] uas: leave can_queue as MAX_CMNDS if device reports larger qdepth

2016-05-23 Thread tom . ty89
From: Tom Yan Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") made qdepth limit set in host template (`.can_queue = MAX_CMNDS`) useless. Instead of removing the template limit, now we only change limit according to the qdepth reported by the device if it is smaller than MAX

RE: UBSAN whinge in ihci-hub.c

2016-05-23 Thread David Laight
From: Andrey Ryabinin > Sent: 18 May 2016 13:21 ... > >> $ 6.5.6.8 > >>"If both the pointer operand and the result point to elements of > >> the same array object, > >> or one past the last element of the array object, the evaluation > >> shall not produce an overflow; > >> otherwise,

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Oliver Neukum
On Mon, 2016-05-23 at 07:43 -0700, Guenter Roeck wrote: > On 05/23/2016 06:58 AM, Oliver Neukum wrote: > > Now I am confused. Are you saying that the choice of Alternate Mode does > > not belong into user space? > > > > No; sorry for the confusion. The above was meant to apply to my use > of "pre

RE: [PATCH V2 2/2] usb: musb: Stop bulk endpoint while queue is rotated

2016-05-23 Thread Andrew Goodbody
> From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] > On 05/23/2016 04:40 PM, Sergei Shtylyov wrote: > > Ensure that the endpoint is stopped by clearing REQPKT before > clearing DATAERR_NAKTIMEOUT before rotating the queue on the > dedicated bulk endpoint. > Thi

Re: [PATCH v5 0/5] da8xx USB PHY platform devices and clocks (was "da8xx UBS clocks")

2016-05-23 Thread David Lechner
On 05/09/2016 06:46 PM, David Lechner wrote: v5 changes: renamed "usbphy" to "usb_phy" or "usb-phy" as appropriate David Lechner (5): ARM: davinci: da8xx: add usb phy clocks ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration. ARM: davinci: da8xx: Add USB PHY platform declarati

Re: [OOPS] cppi41_dma_channel_program: Unable to handle kernel NULL pointer dereference

2016-05-23 Thread Tony Lindgren
* Matwey V. Kornilov [160523 06:41]: > 2016-05-23 16:35 GMT+03:00 Bin Liu : > > On Sat, May 21, 2016 at 08:50:32PM +0300, Matwey V. Kornilov wrote: > >> 2016-05-21 6:13 GMT+03:00 Bin Liu : > >> > After reviewed the code, it must be hw_ep->rx_channel instead. It is > >> > likely a > >> > bug cause

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Guenter Roeck
On 05/23/2016 06:58 AM, Oliver Neukum wrote: On Mon, 2016-05-23 at 06:27 -0700, Guenter Roeck wrote: Good question. I originally added a sysfs attribute 'preferred-mode' to my code, but then concluded that this is supposed to be provided by the platform and added it as platform data instead, w

Re: [regression] uas no longer queues commands since v4.5.2

2016-05-23 Thread James Bottomley
On Mon, 2016-05-23 at 13:48 +0200, Hans de Goede wrote: > Hi, > > On 22-05-16 12:39, Tom Yan wrote: > > With commit 198de51dbc3454d95b015ca0a055b673f85f01bb, uas no longer > > set `queue_depth` with scsi_change_queue_depth(), so now > > `queue_depth` > > of UAS drives are 1. Even though `can_queue

Re: [PATCH V2 2/2] usb: musb: Stop bulk endpoint while queue is rotated

2016-05-23 Thread Sergei Shtylyov
On 05/23/2016 04:40 PM, Sergei Shtylyov wrote: Ensure that the endpoint is stopped by clearing REQPKT before clearing DATAERR_NAKTIMEOUT before rotating the queue on the dedicated bulk endpoint. This addresses an issue where a race could result in the endpoint receiving data before it was reprog

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Oliver Neukum
On Mon, 2016-05-23 at 06:27 -0700, Guenter Roeck wrote: > >> Good question. I originally added a sysfs attribute > 'preferred-mode' to > >> my code, but then concluded that this is supposed to be provided > >> by the platform and added it as platform data instead, with > (currently) > >> no means t

[PATCH] usb: gadget: net2280: add USB2380 support

2016-05-23 Thread Tim Harvey
The PLX USB2380 is a PCIe version of the NET2280 and behaves more like the USB338x but without the USB3.0 superspeed support. This was tested with g_ether, g_serial, g_mass_storage on a Gateworks Ventana GW2383. Cc: Justin DeFields Signed-off-by: Tim Harvey --- drivers/usb/gadget/udc/Kconfig

Re: [OOPS] cppi41_dma_channel_program: Unable to handle kernel NULL pointer dereference

2016-05-23 Thread Matwey V. Kornilov
2016-05-23 16:36 GMT+03:00 Bin Liu : > Hi, > > On Sat, May 21, 2016 at 10:04:48PM +0300, Matwey V. Kornilov wrote: >> 2016-05-21 20:50 GMT+03:00 Matwey V. Kornilov : >> > 2016-05-21 6:13 GMT+03:00 Bin Liu : >> >> Hi, >> >> >> >> On Fri, May 20, 2016 at 4:20 PM, Matwey V. Kornilov >> >> wrote: >>

Re: [PATCH V2 2/2] usb: musb: Stop bulk endpoint while queue is rotated

2016-05-23 Thread Sergei Shtylyov
On 5/23/2016 4:26 PM, Andrew Goodbody wrote: Ensure that the endpoint is stopped by clearing REQPKT before clearing DATAERR_NAKTIMEOUT before rotating the queue on the dedicated bulk endpoint. This addresses an issue where a race could result in the endpoint receiving data before it was reprogra

Re: [OOPS] cppi41_dma_channel_program: Unable to handle kernel NULL pointer dereference

2016-05-23 Thread Matwey V. Kornilov
2016-05-23 16:35 GMT+03:00 Bin Liu : > Hi, > > On Sat, May 21, 2016 at 08:50:32PM +0300, Matwey V. Kornilov wrote: >> 2016-05-21 6:13 GMT+03:00 Bin Liu : >> > Hi, >> > >> > On Fri, May 20, 2016 at 4:20 PM, Matwey V. Kornilov >> > wrote: >> >> 2016-05-21 0:12 GMT+03:00 Bin Liu : >> >>> Hi, >> >>>

Re: [OOPS] cppi41_dma_channel_program: Unable to handle kernel NULL pointer dereference

2016-05-23 Thread Bin Liu
Hi, On Sat, May 21, 2016 at 10:04:48PM +0300, Matwey V. Kornilov wrote: > 2016-05-21 20:50 GMT+03:00 Matwey V. Kornilov : > > 2016-05-21 6:13 GMT+03:00 Bin Liu : > >> Hi, > >> > >> On Fri, May 20, 2016 at 4:20 PM, Matwey V. Kornilov > >> wrote: > >>> 2016-05-21 0:12 GMT+03:00 Bin Liu : > Hi

Re: [OOPS] cppi41_dma_channel_program: Unable to handle kernel NULL pointer dereference

2016-05-23 Thread Bin Liu
Hi, On Sat, May 21, 2016 at 08:50:32PM +0300, Matwey V. Kornilov wrote: > 2016-05-21 6:13 GMT+03:00 Bin Liu : > > Hi, > > > > On Fri, May 20, 2016 at 4:20 PM, Matwey V. Kornilov > > wrote: > >> 2016-05-21 0:12 GMT+03:00 Bin Liu : > >>> Hi, > >>> > >>> On Sat, May 21, 2016 at 12:05:06AM +0300, Ma

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Guenter Roeck
On 05/22/2016 10:34 PM, Oliver Neukum wrote: On Sun, 2016-05-22 at 08:54 -0700, Guenter Roeck wrote: Hi Oliver, On 05/20/2016 11:43 PM, Oliver Neukum wrote: On Fri, 2016-05-20 at 22:51 -0700, Guenter Roeck wrote: On 05/20/2016 06:37 AM, Oliver Neukum wrote: On Fri, 2016-05-20 at 14:24 +0300,

RE: [PATCH V2 2/2] usb: musb: Stop bulk endpoint while queue is rotated

2016-05-23 Thread Andrew Goodbody
> From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] > > Hello. > > On 5/23/2016 3:00 PM, Andrew Goodbody wrote: > > > Ensure that the endpoint is stopped by clearing REQPKT before clearing > > DATAERR_NAKTIMEOUT before rotating the queue on the dedicated bulk > > endpoint. > > Th

RE: xhci DWC3 flavor problem

2016-05-23 Thread David Laight
From: Felipe Balbi > Sent: 19 May 2016 10:57 ... > queue it to the command ring > > > if (ret) { > > spin_unlock_irqrestore(&xhci->lock, flags); > > mutex_unlock(&xhci->mutex); > > xhci_dbg(xhci, "FIXME: allocate a command ring segment\n"); > > k

Re: [PATCH v3] input: tablet: add Pegasus Notetaker tablet driver

2016-05-23 Thread Oliver Neukum
On Mon, 2016-05-23 at 14:43 +0200, Martin Kepplinger wrote: > Am 2016-05-23 um 14:26 schrieb Oliver Neukum: > > On Mon, 2016-05-23 at 13:39 +0200, Martin Kepplinger wrote: > > > >> It's *really* fun to use as an input tablet though! So let's support this > >> for everybody. > > > > Hi, > > > > I

Re: [PATCH v3] input: tablet: add Pegasus Notetaker tablet driver

2016-05-23 Thread Martin Kepplinger
Am 2016-05-23 um 14:26 schrieb Oliver Neukum: > On Mon, 2016-05-23 at 13:39 +0200, Martin Kepplinger wrote: > >> It's *really* fun to use as an input tablet though! So let's support this >> for everybody. > > Hi, > > I am afraid there are a few issues. Thanks for having a look, comments below.

Re: [PATCH V2 2/2] usb: musb: Stop bulk endpoint while queue is rotated

2016-05-23 Thread Sergei Shtylyov
Hello. On 5/23/2016 3:00 PM, Andrew Goodbody wrote: Ensure that the endpoint is stopped by clearing REQPKT before clearing DATAERR_NAKTIMEOUT before rotating the queue on the dedicated bulk endpoint. This addresses an issue where a race could result in the endpoint receiving data before it was

Re: [PATCH v3] input: tablet: add Pegasus Notetaker tablet driver

2016-05-23 Thread Oliver Neukum
On Mon, 2016-05-23 at 13:39 +0200, Martin Kepplinger wrote: > It's *really* fun to use as an input tablet though! So let's support this > for everybody. Hi, I am afraid there are a few issues. 1. Why the kernel thread? 2. This driver has questionable power management. Regards

[PATCH V2 1/2] usb: musb: Ensure rx reinit occurs for shared_fifo endpoints

2016-05-23 Thread Andrew Goodbody
shared_fifo endpoints would only get a previous tx state cleared out, the rx state was only cleared for non shared_fifo endpoints Change this so that the rx state is cleared for all endpoints. This addresses an issue that resulted in rx packets being dropped silently. Signed-off-by: Andrew Goodbod

[PATCH V2 2/2] usb: musb: Stop bulk endpoint while queue is rotated

2016-05-23 Thread Andrew Goodbody
Ensure that the endpoint is stopped by clearing REQPKT before clearing DATAERR_NAKTIMEOUT before rotating the queue on the dedicated bulk endpoint. This addresses an issue where a race could result in the endpoint receiving data before it was reprogrammed resulting in a warning about such data from

[PATCH V2 0/2] usb: musb: fix dropped packets

2016-05-23 Thread Andrew Goodbody
The musb driver can drop rx packets when heavily loaded. These two patches address two issues that can cause this. Both issues arose when an endpoint was reprogrammed. The first patch is a logic bug that resulted in a shared_fifo in rx mode not having its state cleared out. The second patch fixes a

[PATCH] USB: uas: Fix slave queue_depth not being set

2016-05-23 Thread Hans de Goede
Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") removed the scsi_change_queue_depth() call from uas_slave_configure() assuming that the slave would inherit the host's queue_depth, which that commit sets to the same value. This is incorrect, without the scsi_change_queue_depth

Re: [regression] uas no longer queues commands since v4.5.2

2016-05-23 Thread Hans de Goede
Hi, On 22-05-16 12:39, Tom Yan wrote: With commit 198de51dbc3454d95b015ca0a055b673f85f01bb, uas no longer set `queue_depth` with scsi_change_queue_depth(), so now `queue_depth` of UAS drives are 1. Even though `can_queue` is set to `devinfo->qdepth - 2`, but apparently that does not help, since

[PATCH 1/4] usb: gadget: fix unused-but-set-variale warnings

2016-05-23 Thread Michal Nazarewicz
Those are enabled with W=1 make option. type-limits warnings in uvc_configfs.o and f_hid.c are left because they are caused by generic macros used in a way where they produce always-false conditions, e.g.: CC [M] drivers/usb/gadget/function/uvc_configfs.o drivers/usb/gadget/function/uvc_config

[PATCH 2/4] usb: gadget: m66592: fix unused-but-set-variable warnings

2016-05-23 Thread Michal Nazarewicz
This patch fixes the following (W=1) warnings: drivers/usb/gadget/udc/m66592-udc.c: In function ‘m66592_irq’: drivers/usb/gadget/udc/m66592-udc.c:1203:15: warning: variable ‘nrdyenb’ set but not used [-Wunused-but-set-variable] u16 brdyenb, nrdyenb, bempenb; ^ drivers/usb/gadget/

[PATCH 3/4] usb: gadget: r8a66597: fix unused-but-set-variable warnings

2016-05-23 Thread Michal Nazarewicz
This patch fixes the following (W=1) warnings: drivers/usb/gadget/udc/r8a66597-udc.c: In function ‘r8a66597_irq’: drivers/usb/gadget/udc/r8a66597-udc.c:1468:15: warning: variable ‘nrdyenb’ set but not used [-Wunused-but-set-variable] u16 brdyenb, nrdyenb, bempenb; ^ drivers/usb/g

[PATCH 4/4] usb: gadget: mv_u3d: fix unused-but-set-variable warnings

2016-05-23 Thread Michal Nazarewicz
This patch fixes the following (W=1) warnings: drivers/usb/gadget/udc/mv_u3d_core.c: In function ‘mv_u3d_process_ep_req’: drivers/usb/gadget/udc/mv_u3d_core.c:124:6: warning: variable ‘trb_complete’ set but not used [-Wunused-but-set-variable] int trb_complete, actual, remaining_length = 0;

[PATCH 0/4] usb: gadget: fix most of W=1 warinngs

2016-05-23 Thread Michal Nazarewicz
Fixes all of the unused-but-set-variable warnings enabled when building with W=1. As described in the first patch, some warnings are left off. See said patch for more description. Michal Nazarewicz (4): usb: gadget: fix unused-but-set-variale warnings usb: gadget: m66592: fix unused-but-set-

[PATCH v3] input: tablet: add Pegasus Notetaker tablet driver

2016-05-23 Thread Martin Kepplinger
This adds a driver for the Pegasus Notetaker Pen. When connected, this uses the Pen as an input tablet. This device was sold in various different brandings, for example "Pegasus Mobile Notetaker M210", "Genie e-note The Notetaker", "Staedtler Digital ballpoint pen 990 01",

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Oliver Neukum
On Mon, 2016-05-23 at 12:57 +0300, Heikki Krogerus wrote: > Hi Oliver, > > On Fri, May 20, 2016 at 04:19:59PM +0200, Oliver Neukum wrote: > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > Like I've told some of you guys, I'm trying to implement a bus for > > > the Alternate Modes

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-23 Thread Roger Quadros
On 23/05/16 13:34, Jun Li wrote: > Hi > >> -Original Message- >> From: Roger Quadros [mailto:rog...@ti.com] >> Sent: Monday, May 23, 2016 6:12 PM >> To: Peter Chen >> Cc: Jun Li ; peter.c...@freescale.com; ba...@kernel.org; >> t...@atomide.com; gre...@linuxfoundation.org; dan.j.willi...@i

RE: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-23 Thread Jun Li
Hi > -Original Message- > From: Roger Quadros [mailto:rog...@ti.com] > Sent: Monday, May 23, 2016 6:12 PM > To: Peter Chen > Cc: Jun Li ; peter.c...@freescale.com; ba...@kernel.org; > t...@atomide.com; gre...@linuxfoundation.org; dan.j.willi...@intel.com; > mathias.ny...@linux.intel.com;

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-23 Thread Roger Quadros
On 23/05/16 06:21, Peter Chen wrote: > On Sat, May 21, 2016 at 10:29:40AM +0800, Peter Chen wrote: >> On Thu, May 19, 2016 at 10:32:44AM +0300, Roger Quadros wrote: >>> On 18/05/16 17:46, Jun Li wrote: >>> >>> I didn't want to have complex Kconfig so decided to have otg as >>>

Re: [PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-23 Thread Roger Quadros
On 20/05/16 12:53, Peter Chen wrote: > On Fri, May 20, 2016 at 12:19:07PM +0300, Roger Quadros wrote: >> On 20/05/16 11:31, Roger Quadros wrote: >>> On 18/05/16 15:59, Roger Quadros wrote: Hi Peter, On 18/05/16 10:45, Peter Chen wrote: > > > On Mon, May 16, 2016 at 5:00 P

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Heikki Krogerus
Hi Oliver, On Fri, May 20, 2016 at 04:19:59PM +0200, Oliver Neukum wrote: > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > Like I've told some of you guys, I'm trying to implement a bus for > > the Alternate Modes, but I'm still nowhere near finished with that > > one, so let's just

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-23 Thread Heikki Krogerus
On Fri, May 20, 2016 at 10:02:28AM -0700, Guenter Roeck wrote: > On Fri, May 20, 2016 at 01:47:03PM +0300, Heikki Krogerus wrote: > > On Thu, May 19, 2016 at 10:53:04AM -0700, Guenter Roeck wrote: > > > Hello Heikki, > > > > > > On Thu, May 19, 2016 at 03:44:54PM +0300, Heikki Krogerus wrote: > >

[PATCH] usb: dwc3: trace: pretty-print TRB's ctrl field

2016-05-23 Thread Felipe Balbi
From: Janusz Dziedzic Improve trb tracing by showing trb flags, interrupts trb type. trb flags: - h - hardware owner of descriptor - l - last TRB - c - chain buffers - s - continue on short packet interrupt flags: - s - interrupt on short packet - c - interrupt on complete Capital letter means