RE: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Sharma, Sanjeev
-Original Message- From: Hans de Goede [mailto:hdego...@redhat.com] Sent: Wednesday, September 10, 2014 8:33 PM To: Peter Hurley; Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org; linux-s...@vger.kernel.org; sta...@vger.kernel.org; Sharma, Sanjeev; Peter Zijlstra; Ingo Molnar Subject: Re:

RE: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Sharma, Sanjeev
-Original Message- From: Greg Kroah-Hartman [mailto:gre...@linuxfoundation.org] Sent: Wednesday, September 10, 2014 7:21 PM To: Hans de Goede Cc: Oliver Neukum; linux-usb@vger.kernel.org; linux-s...@vger.kernel.org; sta...@vger.kernel.org; Sharma, Sanjeev Subject: Re: [PATCH 01/21] uas: r

Re: [PATCH v6 4/4] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800

2014-09-10 Thread Vivek Gautam
Hi, On Thursday, September 11, 2014 1:52 AM, "Julius Werner" wrote right, use that to call phy_init() at the right time, then you need to add a new ->calibrate() method which, likely, will only be used by you ;-) so you mean, the xhci should itself call phy_init() at a time suitable, s

Re: [PATCH v4 08/12] Documentation: bindings: add doc for the USB2 ChipIdea USB driver

2014-09-10 Thread Peter Chen
On Wed, Sep 03, 2014 at 09:48:27AM +0200, Antoine Tenart wrote: > Document the USB2 ChipIdea driver (ci13xxx) bindings. > > Signed-off-by: Antoine Tenart > --- > .../devicetree/bindings/usb/ci-hdrc-usb2.txt | 22 > ++ > 1 file changed, 22 insertions(+) > create mode 1

Re: [PATCH v4 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-10 Thread Peter Chen
On Wed, Sep 03, 2014 at 09:48:26AM +0200, Antoine Tenart wrote: > Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock > and DMA mask, to support USB2 ChipIdea controllers that don't need > specific functions. > > Tested on the Marvell Berlin SoCs USB controllers. > > Signed-off-by: A

Re: [PATCH v4 9/9] usb: chipidea: add support to the generic PHY framework in ChipIdea

2014-09-10 Thread Peter Chen
On Wed, Sep 03, 2014 at 09:40:40AM +0200, Antoine Tenart wrote: > This patch adds support of the PHY framework for ChipIdea drivers. > Changes are done in both the ChipIdea common code and in the drivers > accessing the PHY. This is done by adding a new PHY member in > ChipIdea's structures and by

Re: [PATCH v4 7/9] usb: rename transceiver and phy to usb_phy in ChipIdea

2014-09-10 Thread Peter Chen
On Wed, Sep 03, 2014 at 09:40:38AM +0200, Antoine Tenart wrote: > This patch prepares the introduction of the generic PHY support in the > USB ChipIdea common functions. The USB PHY member of the ChipIdea > structure ('transceiver') is renamed to 'usb_phy', the 'phy' member of > the ChipIdea pdata

Re: [PATCH v4 8/9] usb: chipidea: move usb_otg into struct ci_hdrc

2014-09-10 Thread Peter Chen
On Wed, Sep 03, 2014 at 09:40:39AM +0200, Antoine Tenart wrote: > Move the usb_otg member from struct usb_phy to struct ci_hdrc. Rework > its initialization taking in account this modification. > > Signed-off-by: Antoine Tenart > --- > drivers/usb/chipidea/ci.h | 1 + > drivers/usb/chipide

Re: [PATCH 1/4] usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()

2014-09-10 Thread Yoshihiro Shimoda
Hi Morimoto-san, (2014/09/11 8:56), Kuninori Morimoto wrote: > > Hi Shimoda-san > >> --- a/drivers/usb/renesas_usbhs/mod_gadget.c >> +++ b/drivers/usb/renesas_usbhs/mod_gadget.c >> @@ -602,6 +602,9 @@ static int usbhsg_ep_disable(struct usb_ep *ep) >> struct usbhsg_uep *uep = usbhsg_ep_to_u

[PATCH 0/2] Chipidea fixes for 3.17

2014-09-10 Thread Peter Chen
Hi Greg, Below patches are fixes for qualcomm part at chipidea, the user needs it very much, thanks. http://www.spinics.net/lists/linux-usb/msg113233.html Ivan T. Ivanov (2): usb: chipidea: msm: Use USB PHY API to control PHY state usb: chipidea: msm: Initialize PHY on reset event drivers/

Re: [PATCH 1/4] usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()

2014-09-10 Thread Yoshihiro Shimoda
Hi, (2014/09/10 22:49), Felipe Balbi wrote: > On Wed, Sep 10, 2014 at 07:33:40PM +0900, Yoshihiro Shimoda wrote: >> This patch fixes an issue that the NULL pointer dereference happens >> when we use g_audio driver. Since the g_audio driver will call >> usb_ep_disable() in afunc_set_alt() before it

Re: [PATCH 0/4] usb: renesas_usbhs: fixes this driver in gadget mode (part2)

2014-09-10 Thread Yoshihiro Shimoda
Hi Felipe, (2014/09/10 22:49), Felipe Balbi wrote: > On Wed, Sep 10, 2014 at 07:33:27PM +0900, Yoshihiro Shimoda wrote: >> If we tested this driver as gadget, some issues below happened: >> - Oops happened if g_audio. >> - A usb enumeration may fail if we do insmod during connected the usb cable

Re: [PATCH v3 0/6] usb: host: change TPL support behaviour

2014-09-10 Thread Greg KH
On Thu, Sep 11, 2014 at 07:57:12AM +0800, Peter Chen wrote: > On Fri, Sep 05, 2014 at 10:08:02AM -0400, Alan Stern wrote: > > On Fri, 5 Sep 2014, Peter Chen wrote: > > > > > On Thu, Sep 04, 2014 at 11:12:42AM -0400, Alan Stern wrote: > > > > On Thu, 4 Sep 2014, Peter Chen wrote: > > > > > > > > >

Re: [PATCH v3 0/6] usb: host: change TPL support behaviour

2014-09-10 Thread Peter Chen
On Fri, Sep 05, 2014 at 10:08:02AM -0400, Alan Stern wrote: > On Fri, 5 Sep 2014, Peter Chen wrote: > > > On Thu, Sep 04, 2014 at 11:12:42AM -0400, Alan Stern wrote: > > > On Thu, 4 Sep 2014, Peter Chen wrote: > > > > > > > On Wed, Sep 03, 2014 at 09:48:15PM -0400, Alan Stern wrote: > > > > > On

Re: [PATCH 1/4] usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()

2014-09-10 Thread Kuninori Morimoto
Hi Shimoda-san > --- a/drivers/usb/renesas_usbhs/mod_gadget.c > +++ b/drivers/usb/renesas_usbhs/mod_gadget.c > @@ -602,6 +602,9 @@ static int usbhsg_ep_disable(struct usb_ep *ep) > struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); > struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); > >

Re: your old usbtree utility

2014-09-10 Thread Gene Heskett
On Wednesday 10 September 2014 17:18:27 Alan Stern did opine And Gene did reply: > On Wed, 10 Sep 2014, Gene Heskett wrote: > > On Wednesday 10 September 2014 15:17:24 Randy Dunlap wrote: > > > > Adding linux-usb, perhaps someone there can tell me how to tame this > > beast. > > > > > On 09/10/14

Re: your old usbtree utility

2014-09-10 Thread Alan Stern
On Wed, 10 Sep 2014, Gene Heskett wrote: > On Wednesday 10 September 2014 15:17:24 Randy Dunlap wrote: > > Adding linux-usb, perhaps someone there can tell me how to tame this > beast. > > > On 09/10/14 12:02, Gene Heskett wrote: > > > On Wednesday 10 September 2014 14:30:22 Randy Dunlap wrote:

Re: your old usbtree utility

2014-09-10 Thread Gene Heskett
On Wednesday 10 September 2014 15:17:24 Randy Dunlap wrote: Adding linux-usb, perhaps someone there can tell me how to tame this beast. > On 09/10/14 12:02, Gene Heskett wrote: > > On Wednesday 10 September 2014 14:30:22 Randy Dunlap wrote: > >> On 09/10/14 07:47, Gene Heskett wrote: > >>> Greet

Re: Updated linux uas driver, please test

2014-09-10 Thread Douglas Gilbert
On 14-09-10 08:13 AM, Hans de Goede wrote: Hi All, I'm mailing all of you because you've reported various problems with the new uas support in kernel 3.16 and later. I've been working on making the uas driver more resilient to errors, as well as improved logging so we can easier figure out the

Re: [PATCH 0/6] usb: dwc2/gadget: improvements for gadget driver

2014-09-10 Thread Greg KH
On Tue, Sep 09, 2014 at 10:44:51AM +0200, Robert Baldyga wrote: > Hi, > > I have splitted my patchset "usb: dwc2/gadget: fix series" into two series. > This patch series contains improvements for dwc2/gadget driver. It's intended > for 3.18. > > Andrzej Pietrasiewicz (1): > usb: dwc2/gadget: Fi

Re: am335x musb_hdrc broken(?)

2014-09-10 Thread Alan Stern
On Wed, 10 Sep 2014, Felipe Balbi wrote: > Hi, > > On Wed, Sep 10, 2014 at 11:02:23PM +0400, Matwey V. Kornilov wrote: > > 2014-09-10 19:53 GMT+04:00 Felipe Balbi : > > > you probably need a USB sniffer. usbmon (Documentation/usb/usbmon.txt) > > > will help to some extent, but some details can on

Re: [PATCH] usb: hub: take hub->hdev reference when processing from eventlist

2014-09-10 Thread Greg KH
On Wed, Sep 10, 2014 at 03:43:08PM -0400, Alan Stern wrote: > On Wed, 10 Sep 2014, Joe Lawrence wrote: > > > Hi Alan, > > > > Here is a revised patch for yesterday's use-after-free bug report. I > > moved the hdev assignment and reference inside the hub_event_lock, then > > returned the ref on t

Re: [PATCH v6 4/4] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800

2014-09-10 Thread Julius Werner
>> right, use that to call phy_init() at the right time, then you need to >> add a new ->calibrate() method which, likely, will only be used by you >> ;-) > so you mean, the xhci should itself call phy_init() at a time suitable, > so that ->calibrate() is not required at all ? I'm not sure if tha

Re: am335x musb_hdrc broken(?)

2014-09-10 Thread Felipe Balbi
Hi, On Wed, Sep 10, 2014 at 11:02:23PM +0400, Matwey V. Kornilov wrote: > 2014-09-10 19:53 GMT+04:00 Felipe Balbi : > > you probably need a USB sniffer. usbmon (Documentation/usb/usbmon.txt) > > will help to some extent, but some details can only be seen with a hw > > sniffer. > > Hi > > To this

Re: [PATCH] usb: hub: take hub->hdev reference when processing from eventlist

2014-09-10 Thread Alan Stern
On Wed, 10 Sep 2014, Joe Lawrence wrote: > Hi Alan, > > Here is a revised patch for yesterday's use-after-free bug report. I > moved the hdev assignment and reference inside the hub_event_lock, then > returned the ref on the way out of hub_events. > > Ordering is now symmetric: > > kref_get(&h

Re: crash in recursively_mark_NOTATTACHED

2014-09-10 Thread Joe Lawrence
On Tue, 9 Sep 2014 14:29:11 -0400 Alan Stern wrote: > On Tue, 9 Sep 2014, Joe Lawrence wrote: > > > On Tue, 9 Sep 2014 11:30:24 -0400 > > Alan Stern wrote: > > > > > On Tue, 9 Sep 2014, Joe Lawrence wrote: > > > > > > In summary, khubd has initialized the usb_device maxchild to 8 and > > > >

[PATCH] usb: hub: take hub->hdev reference when processing from eventlist

2014-09-10 Thread Joe Lawrence
Hi Alan, Here is a revised patch for yesterday's use-after-free bug report. I moved the hdev assignment and reference inside the hub_event_lock, then returned the ref on the way out of hub_events. Ordering is now symmetric: kref_get(&hub->kref) usb_get_dev(hdev) usb_lock_device(hdev) ... usb_un

Re: am335x musb_hdrc broken(?)

2014-09-10 Thread Matwey V. Kornilov
2014-09-10 19:53 GMT+04:00 Felipe Balbi : > you probably need a USB sniffer. usbmon (Documentation/usb/usbmon.txt) > will help to some extent, but some details can only be seen with a hw > sniffer. Hi To this moment I've found the following. Angstrom 3.8 works as expected, 3.16 also works until i

Re: [PATCH 18/21] uas: Use scsi_print_command

2014-09-10 Thread Hans de Goede
Hi Robert, On 09/10/2014 06:08 PM, Elliott, Robert (Server Storage) wrote: > > >> -Original Message- >> From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- >> ow...@vger.kernel.org] On Behalf Of Hans de Goede >> Sent: Wednesday, 10 September, 2014 6:47 AM >> To: Greg Kroah-Hartman

Re: [PATCH 2/2] usb: f_fs: replace BUG in dead-code with less serious WARN_ON

2014-09-10 Thread Felipe Balbi
On Wed, Sep 10, 2014 at 05:50:25PM +0200, Michal Nazarewicz wrote: > Even though the BUG() in __ffs_event_add is a dead-code, it is still > better to warn rather then crash the system if that code ever gets > executed. > > Suggested-by: Felipe Balbi > Signed-off-by: Michal Nazarewicz > --- > Th

RE: [PATCH 18/21] uas: Use scsi_print_command

2014-09-10 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of Hans de Goede > Sent: Wednesday, 10 September, 2014 6:47 AM > To: Greg Kroah-Hartman > Cc: linux-usb@vger.kernel.org; linux-s...@vger.kernel.org; > sta...@vger.kernel.or

Re: am335x musb_hdrc broken(?)

2014-09-10 Thread Felipe Balbi
On Wed, Sep 10, 2014 at 06:45:32PM +0400, Matwey V. Kornilov wrote: > 2014-09-10 17:52 GMT+04:00 Felipe Balbi : > > Hi, > > > > On Wed, Sep 10, 2014 at 11:06:05AM +0400, Matwey V. Kornilov wrote: > >> 2014-09-09 22:20 GMT+04:00 Felipe Balbi : > >> > oh, so it's not really a BBB. I have never seen a

[PATCH 1/2] usb: f_fs: refactor and document __ffs_ep0_read_events better

2014-09-10 Thread Michal Nazarewicz
Instead of using variable length array, use a static length equal to the size of the ffs->ev.types array. This gets rid of a sparse warning: drivers/usb/gadget/function/f_fs.c:401:44: warning: Variable length array is used. and makes it more explicit that the array has a very tig

[PATCH 2/2] usb: f_fs: replace BUG in dead-code with less serious WARN_ON

2014-09-10 Thread Michal Nazarewicz
Even though the BUG() in __ffs_event_add is a dead-code, it is still better to warn rather then crash the system if that code ever gets executed. Suggested-by: Felipe Balbi Signed-off-by: Michal Nazarewicz --- This has been compile tested only. drivers/usb/gadget/function/f_fs.c | 4 +++- 1 f

Re: [REGRESSION 3.17] scsi (uas) disks no longer using tagged command queuing

2014-09-10 Thread Christoph Hellwig
On Wed, Sep 10, 2014 at 09:21:24AM +0200, Hans de Goede wrote: > I've applied the patch, this results in the following new dmesg output > when using uas: > > [ 120.602632] initialized host-wide tag map! > > Thank you for looking into this. So we're initializing the tag map, but scsi_activate_tc

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 04:38 PM, Peter Hurley wrote: > [ +cc Peter Zijlstra, Ingo Molnar ] > > On 09/10/2014 07:46 AM, Hans de Goede wrote: >> From: Sanjeev Sharma >> >> On some architecture spin_is_locked() always return false in >> uniprocessor configuration and therefore it would be advise to repl

RE: PROBLEM: XHCI Host Controller on Intel Panther Point with CDC/ACM dead after massive NAK

2014-09-10 Thread Alan Stern
On Wed, 10 Sep 2014, Kasberger Andreas wrote: > We have a problem with a CDC device that simulates a serial > interface. Problem is that the host stops CDC BULK IN transfers after > a while on those USB2.0 ports that are connected to the chip set's > internal rate matching hub, others seem to work

Re: am335x musb_hdrc broken(?)

2014-09-10 Thread Matwey V. Kornilov
2014-09-10 17:52 GMT+04:00 Felipe Balbi : > Hi, > > On Wed, Sep 10, 2014 at 11:06:05AM +0400, Matwey V. Kornilov wrote: >> 2014-09-09 22:20 GMT+04:00 Felipe Balbi : >> > oh, so it's not really a BBB. I have never seen an EMBEST RevB3. Do you >> > have access to that board's accessory and/or a real

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Peter Hurley
[ +cc Peter Zijlstra, Ingo Molnar ] On 09/10/2014 07:46 AM, Hans de Goede wrote: > From: Sanjeev Sharma > > On some architecture spin_is_locked() always return false in > uniprocessor configuration and therefore it would be advise to replace > with lockdep_assert_held(). > > Signed-off-by: Sanj

Re: [RFC]Johan's patch for touchscreens and port power off

2014-09-10 Thread Alan Stern
On Wed, 10 Sep 2014, Oliver Neukum wrote: > On Tue, 2014-09-09 at 14:33 -0400, Alan Stern wrote: > > > Only runtime D3cold would be affected. System suspend would still be > > able to use D3cold. > > Yes. But it looks like system suspend is on the way out in the long run. Regardless, this is

Re: [PATCH v4 2/2] usb: gadget: Add xilinx usb2 device support

2014-09-10 Thread Arnd Bergmann
On Wednesday 10 September 2014 19:25:11 sundeep subbaraya wrote: > > that's not exactly what I asked Usually you only add COMPILE_TEST > > when you have an ARCH dependency. So something like: > > > > depends on ARCH_ARM || COMPILE_TEST > > > > would make it clear that this driver is only a

Re: [PATCH 10/21] uas: zap_pending: data urbs should have completed at this time

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 04:10 PM, Oliver Neukum wrote: > On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: >> uas_log_cmd_state(cmnd, __func__); >> - /* all urbs are killed, clear inflight bits */ >> - cmdinfo->state &= ~(COMMAND_INFLIGHT | >> -

Re: [PATCH 10/21] uas: zap_pending: data urbs should have completed at this time

2014-09-10 Thread Oliver Neukum
On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: > uas_log_cmd_state(cmnd, __func__); > - /* all urbs are killed, clear inflight bits */ > - cmdinfo->state &= ~(COMMAND_INFLIGHT | > - DATA_IN_URB_INFLIGHT | > -

Re: [PATCH 20/21] uas: Remove support for old sense ui as used in pre-production hardware

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 04:06 PM, Oliver Neukum wrote: > On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: >> I've access to a number of different uas devices now, and none of them use >> old style sense urbs. The only case where these code-paths trigger is with >> the asm1051 and there they do th

Re: [PATCH 20/21] uas: Remove support for old sense ui as used in pre-production hardware

2014-09-10 Thread Oliver Neukum
On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: > I've access to a number of different uas devices now, and none of them use > old style sense urbs. The only case where these code-paths trigger is with > the asm1051 and there they do the wrong thing, as the asm1051 sends 8 bytes > status iu

Re: [PATCH 17/21] uas: Do not log urb status error on cancellation

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 04:00 PM, Oliver Neukum wrote: > On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: >> Check for both type of cancellation codes for sense and data urbs. > > Then you should also check for -ESHUTDOWN (unplug of HC) The intent here is to stop log pollution when cancelling b

Re: [PATCH 17/21] uas: Do not log urb status error on cancellation

2014-09-10 Thread Oliver Neukum
On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: > Check for both type of cancellation codes for sense and data urbs. Then you should also check for -ESHUTDOWN (unplug of HC) Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in

Re: [PATCH v4 2/2] usb: gadget: Add xilinx usb2 device support

2014-09-10 Thread sundeep subbaraya
Hi Felipe, On Thu, Aug 21, 2014 at 7:30 PM, Felipe Balbi wrote: > On Thu, Aug 21, 2014 at 12:19:03PM +0530, sundeep subbaraya wrote: >> Hi Daniel, >> >> On Tue, Aug 19, 2014 at 3:26 PM, Daniel Mack wrote: >> > Hi, >> > >> > On 07/22/2014 11:08 AM, Subbaraya Sundeep Bhatta wrote: >> >> This patch

[PATCH v5 2/2] usb: gadget: Add xilinx usb2 device support

2014-09-10 Thread Subbaraya Sundeep Bhatta
Xilinx USB2 device is a soft IP which supports both full and high speed USB 2.0 data transfers. This patch adds xilinx usb2 device driver support. Signed-off-by: Subbaraya Sundeep Bhatta --- Changes for v5: - used devm_kzalloc instead of kzalloc - used snprintf instead of sprintf

[PATCH v5 1/2] usb: doc: udc-xilinx: Add devicetree bindings

2014-09-10 Thread Subbaraya Sundeep Bhatta
Add devicetree bindings for Xilinx udc driver. Signed-off-by: Subbaraya Sundeep Bhatta --- Changes for v5: - None Changes for v4: - renamed xlnx,axi-usb2-device-4.00.a to xlnx,usb2-device-4.00.a Changes for v3: - None Changes for v2: - replaced xlnx,include-dma wit

Re: am335x musb_hdrc broken(?)

2014-09-10 Thread Felipe Balbi
Hi, On Wed, Sep 10, 2014 at 11:06:05AM +0400, Matwey V. Kornilov wrote: > 2014-09-09 22:20 GMT+04:00 Felipe Balbi : > > oh, so it's not really a BBB. I have never seen an EMBEST RevB3. Do you > > have access to that board's accessory and/or a real BBB to check ? > > They claim it is just A5A. So,

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Greg Kroah-Hartman
On Wed, Sep 10, 2014 at 03:15:41PM +0200, Hans de Goede wrote: > Hi, > > On 09/10/2014 02:54 PM, Oliver Neukum wrote: > > On Wed, 2014-09-10 at 14:00 +0200, Hans de Goede wrote: > >> Hi, > >> > >> On 09/10/2014 01:56 PM, Oliver Neukum wrote: > >>> On Wed, 2014-09-10 at 13:48 +0200, Hans de Goede w

Re: [PATCH 4/4] usb: renesas_usbhs: fix usbhs_pipe_clear() for DCP PIPE

2014-09-10 Thread Felipe Balbi
On Wed, Sep 10, 2014 at 07:34:13PM +0900, Yoshihiro Shimoda wrote: > Since the DCPCTR doesn't have the ACLRM bit, the usbus_pipe_clear() > should not call the usbhsp_pipectrl_set() with ACLRM. > So, this patch fixes this issue to add the usbhs_fifo_clear_dcp() > in fifo.c because the controller nee

Re: [PATCH 3/4] usb: renesas_usbhs: fix the timing of dcp_control_transfer_done

2014-09-10 Thread Felipe Balbi
On Wed, Sep 10, 2014 at 07:34:05PM +0900, Yoshihiro Shimoda wrote: > According to the datasheet, this driver should clear the INTSTS0.CTRT > bit before this controller detects the next stage transition. Otherwise, > the driver may not be able to clear the bit after the controller went to > the next

Re: [PATCH 2/4] usb: renesas_usbhs: gadget: fix the behavior of pullup

2014-09-10 Thread Felipe Balbi
On Wed, Sep 10, 2014 at 07:33:52PM +0900, Yoshihiro Shimoda wrote: > This patch fixes an issue that this driver always enable the D+ pullup > after it detected the VBUS connection even though this usb controller > can control the D+ pullup timing by software. So, this driver should > enable the D+

Re: [PATCH 03/21] uas: Fix resetting flag handling

2014-09-10 Thread Hans de Goede
Hi, First of all, thank you for reviewing this. On 09/10/2014 03:40 PM, Oliver Neukum wrote: > On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: >> - Make sure we always hold the lock when setting / checking resetting >> - Check resetting before checking urb->status >> - Add missing check f

Re: [PATCH 0/4] usb: renesas_usbhs: fixes this driver in gadget mode (part2)

2014-09-10 Thread Felipe Balbi
On Wed, Sep 10, 2014 at 07:33:27PM +0900, Yoshihiro Shimoda wrote: > If we tested this driver as gadget, some issues below happened: > - Oops happened if g_audio. > - A usb enumeration may fail if we do insmod during connected the usb cable. > - A transaction will not finish if g_zero. > - A us

Re: [PATCH 1/4] usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()

2014-09-10 Thread Felipe Balbi
On Wed, Sep 10, 2014 at 07:33:40PM +0900, Yoshihiro Shimoda wrote: > This patch fixes an issue that the NULL pointer dereference happens > when we use g_audio driver. Since the g_audio driver will call > usb_ep_disable() in afunc_set_alt() before it calls usb_ep_enable(), > the uep->pipe of renesas

Re: Problem with commit usb: gadget: introduce gadget state tracking

2014-09-10 Thread Felipe Balbi
Hi, On Wed, Sep 10, 2014 at 03:36:44PM +0200, François MULLER wrote: > >you haven't missed anything, you're correct. Do you want to send this in > >a proper patch format so it's included in all supported kernels which > >are affected by this bug ? > > > >Please have a read at Documentation/CodingS

Re: [PATCH 03/21] uas: Fix resetting flag handling

2014-09-10 Thread Oliver Neukum
On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: > - Make sure we always hold the lock when setting / checking resetting > - Check resetting before checking urb->status > - Add missing check for resetting to uas_data_cmplt > - Add missing check for resetting to uas_do_work Why is the checki

Re: Problem with commit usb: gadget: introduce gadget state tracking

2014-09-10 Thread François MULLER
Hi, Le 09/09/2014 16:57, Felipe Balbi a écrit : you haven't missed anything, you're correct. Do you want to send this in a proper patch format so it's included in all supported kernels which are affected by this bug ? Please have a read at Documentation/CodingStyle, Documentation/SubmittingPatc

Re: [PATCH 02/21] uas: Remove task-management / abort error handling code

2014-09-10 Thread Oliver Neukum
On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: > This commit removes the abort / lun-reset error handling paths, and also the > taks-mgmt code since those are the only 2 task-mgmt users. Leaving only the > (tested and testable) usb-device-reset error handling path in place. > > Note I re

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 02:54 PM, Oliver Neukum wrote: > On Wed, 2014-09-10 at 14:00 +0200, Hans de Goede wrote: >> Hi, >> >> On 09/10/2014 01:56 PM, Oliver Neukum wrote: >>> On Wed, 2014-09-10 at 13:48 +0200, Hans de Goede wrote: Hi, Note this series is NOT intended for stable, but I acc

Re: PROBLEM: XHCI Host Controller on Intel Panther Point with CDC/ACM dead after massive NAK

2014-09-10 Thread Lu, Baolu
Hi Andreas, I'd like to reproduce this problem in the lab. How can I get a CDC device? Thanks, -baolu On 9/10/2014 3:04 PM, Kasberger Andreas wrote: So I am back with more tests on this problem. Intel itself told us it is a problem on the driver for the XHCI host controller. I will put some s

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Oliver Neukum
On Wed, 2014-09-10 at 14:00 +0200, Hans de Goede wrote: > Hi, > > On 09/10/2014 01:56 PM, Oliver Neukum wrote: > > On Wed, 2014-09-10 at 13:48 +0200, Hans de Goede wrote: > >> Hi, > >> > >> Note this series is NOT intended for stable, but I accidentally > >> had "cc = sta...@vger.kernel.org" in my

Re: USB-UART device from Exar Co. not working with cdc_acm but usbserial

2014-09-10 Thread Johan Hovold
On Wed, Sep 03, 2014 at 10:37:39AM -0500, Sergio De León wrote: > On 09/03/2014 03:43 AM, Johan Hovold wrote: > > On Tue, Sep 02, 2014 at 03:43:52PM -0500, Sergio De León wrote: > >> Here are the debug logs you asked me > >> > >> * dmesg output while connecting the device without dynamic debug > >

Updated linux uas driver, please test

2014-09-10 Thread Hans de Goede
Hi All, I'm mailing all of you because you've reported various problems with the new uas support in kernel 3.16 and later. I've been working on making the uas driver more resilient to errors, as well as improved logging so we can easier figure out the cause of errors. I would like to ask you all

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 01:56 PM, Oliver Neukum wrote: > On Wed, 2014-09-10 at 13:48 +0200, Hans de Goede wrote: >> Hi, >> >> Note this series is NOT intended for stable, but I accidentally >> had "cc = sta...@vger.kernel.org" in my .git/config when sending >> this series, please ignore for stable. >> >

RE: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Sharma, Sanjeev
-Original Message- From: Oliver Neukum [mailto:oneu...@suse.de] Sent: Wednesday, September 10, 2014 5:26 PM To: Hans de Goede Cc: Greg Kroah-Hartman; linux-usb@vger.kernel.org; linux-s...@vger.kernel.org; sta...@vger.kernel.org; Sharma, Sanjeev Subject: Re: [PATCH 01/21] uas: replace WARN

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Oliver Neukum
On Wed, 2014-09-10 at 13:48 +0200, Hans de Goede wrote: > Hi, > > Note this series is NOT intended for stable, but I accidentally > had "cc = sta...@vger.kernel.org" in my .git/config when sending > this series, please ignore for stable. > > NACK for stable. If this is not for stable, what do yo

[PATCH 08/21] uas: Free data urbs on completion

2014-09-10 Thread Hans de Goede
Now that we no longer drop our lock to unlink the data urbs, we can simply free them on completion, making their handling consistent with the other urbs. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/us

[PATCH 03/21] uas: Fix resetting flag handling

2014-09-10 Thread Hans de Goede
- Make sure we always hold the lock when setting / checking resetting - Check resetting before checking urb->status - Add missing check for resetting to uas_data_cmplt - Add missing check for resetting to uas_do_work Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 49 +++

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
Hi, Note this series is NOT intended for stable, but I accidentally had "cc = sta...@vger.kernel.org" in my .git/config when sending this series, please ignore for stable. NACK for stable. Sorry & Regards, Hans On 09/10/2014 01:46 PM, Hans de Goede wrote: > From: Sanjeev Sharma > > On some

[PATCH 10/21] uas: zap_pending: data urbs should have completed at this time

2014-09-10 Thread Hans de Goede
The data urbs are all killed before calling zap_pending, and their completion handler should have cleared their inflight flag. Do not 0 the data inflight flags, and add a check for try_complete succeeding, as it should always succeed when called from zap_pending. Signed-off-by: Hans de Goede ---

[PATCH 04/21] uas: Add uas_get_tag() helper function

2014-09-10 Thread Hans de Goede
Factor out the mapping of scsi-tags -> uas-tags/stream-ids to a helper function so that there is a single place where this "magic" happens. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff -

[PATCH 13/21] uas: Drop all references to a scsi_cmnd once it has been aborted

2014-09-10 Thread Hans de Goede
Do not keep references around to a cmnd which is under error handling. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 47 --- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/u

[PATCH 19/21] uas: Drop COMMAND_COMPLETED flag

2014-09-10 Thread Hans de Goede
It was only used to sanity check against completing the same cmnd twice, but that is the case we're likely operating on free-ed memory, and doing sanity checks on free-ed memory is not really helpful. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 10 +++--- 1 file changed, 3 i

[PATCH 17/21] uas: Do not log urb status error on cancellation

2014-09-10 Thread Hans de Goede
Check for both type of cancellation codes for sense and data urbs. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 685eb37..46b8788 100644 --- a/drive

[PATCH 15/21] uas: pre_reset and suspend: Fix a few races

2014-09-10 Thread Hans de Goede
The purpose of uas_pre_reset is to: 1) Stop any new commands from being submitted while an externally triggered usb-device-reset is running 2) Wait for any pending commands to finish before allowing the usb-device-reset to continue The purpose of uas_suspend is to: 2) Wait for any pending c

[PATCH 09/21] uas: Simplify reset / disconnect handling

2014-09-10 Thread Hans de Goede
Drop the whole dance with first moving cmnds to a dead-list. The resetting flag ensures that no new cmds / urbs will be submitted, and that any urb completions are short-circuited without trying to complete the scsi cmnd. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 43 ++

[PATCH 02/21] uas: Remove task-management / abort error handling code

2014-09-10 Thread Hans de Goede
There are various bug reports about oopses / hangs with the uas driver, which all point to the abort-command and logical-unit-reset (task-management) error handling paths. Getting these right is very hard, there are quite a few corner cases, and testing is almost impossible since under normal oper

[PATCH 21/21] uas: Remove protype hardware usb interface info

2014-09-10 Thread Hans de Goede
We've removed all hack from the driver for pre-production hardware. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 23c0b97..a7f16c4 100644 --- a/drivers/usb/storage/uas.c

[PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
From: Sanjeev Sharma On some architecture spin_is_locked() always return false in uniprocessor configuration and therefore it would be advise to replace with lockdep_assert_held(). Signed-off-by: Sanjeev Sharma Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 8 1 file ch

[PATCH 16/21] uas: Use streams on upcoming 10Gbps / 3.1 USB

2014-09-10 Thread Hans de Goede
Limit the no-streams case to speeds less then USB_SPEED_SUPER. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index aaca65b..685eb37 100644 --- a/drivers/usb/stor

[PATCH 05/21] uas: Do not use scsi_host_find_tag

2014-09-10 Thread Hans de Goede
Using scsi_host_find_tag with tags returned by the device is unsafe for multiple reasons: 1) It returns tags->rqs[tag], which may be non NULL even when the cmnd is not owned by us 2) It returns tags->rqs[tag], without holding any locks protecting it 3) It returns tags->rqs[tag], without doing a

[PATCH 18/21] uas: Use scsi_print_command

2014-09-10 Thread Hans de Goede
Use scsi_print_command to print commands during errors, rather then printing the rather meaningless pointer to the command. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/

[PATCH 11/21] uas: Drop inflight list

2014-09-10 Thread Hans de Goede
We've the same info doubled in both the inflight list and the cmnd array, drop the list. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storag

[PATCH 12/21] uas: Remove cmnd reference from the cmd urb

2014-09-10 Thread Hans de Goede
It is not strictly necessary for the cmd urb to have a reference to the cmnd, and without this reference it becomes easier to drop all references to a cmnd on an abort. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff

[PATCH 06/21] uas: Check against unexpected completions

2014-09-10 Thread Hans de Goede
The status urb should not complete before the command has been submitted, nor should we get a second status urb for the same tag after a IU_ID_STATUS. Data urbs should not complete before the command has been submitted, but may complete after the IU_ID_STATUS. Signed-off-by: Hans de Goede --- d

[PATCH 14/21] uas: Fix memleak of non-submitted urbs

2014-09-10 Thread Hans de Goede
Not all urbs we've allocated are necessarily also submitted, non-submitted urbs will not be free-ed by their completion handler. So we need to free them manually. There are 2 scenarios where this can happen: 1) We have failed to submit some urbs at abort / disconnect 2) When running over usb-2 we

[PATCH 20/21] uas: Remove support for old sense ui as used in pre-production hardware

2014-09-10 Thread Hans de Goede
I've access to a number of different uas devices now, and none of them use old style sense urbs. The only case where these code-paths trigger is with the asm1051 and there they do the wrong thing, as the asm1051 sends 8 bytes status iu-s when it does not have any sense data, but uses new style sens

[PATCH 07/21] uas: Simplify unlink of data urbs on error

2014-09-10 Thread Hans de Goede
There is no need for all the trickery with dropping the lock, we can simply reference the urbs while we hold the lock to ensure the urbs don't disappear beneath us, and do the actual unlink (+ unreference) after we've dropped the lock. This also fixes a race where we may loose of cmnd ownership to

[PATCH 00/21] uas: rewrite error handling for robustness + misc cleanups

2014-09-10 Thread Hans de Goede
Hi Greg, et al, Since we've been receiving multiple bug reports with crashes / oopses related to uas error handling, I've spend the last 7 days rewriting the error handling code. This new code has been extensively tested, doing externally triggered usb-device-resets and scsi bus resets while havin

libusbg - status update

2014-09-10 Thread Krzysztof Opasiak
Dear All, I'm writing to let you know that three series of patch: >From mailing list: - Add import from/export to file functionality - Small fixes and clean up Form pull request to libusbg: - Fix out-of-tree builds[1] Has been merged into master branch of my github repository[2]. Feel free to

Re: [patch] usb: gadget: f_fs: signedness bug in __ffs_func_bind_do_descs()

2014-09-10 Thread Dan Carpenter
On Tue, Sep 09, 2014 at 06:37:02PM +0200, Michal Nazarewicz wrote: > On Tue, Sep 09 2014, Dan Carpenter wrote: > > On Tue, Sep 09, 2014 at 03:57:26PM +0200, Michal Nazarewicz wrote: > >> On Tue, Sep 09 2014, Dan Carpenter wrote: > >> > Btw, there is a sparse warning: > >> > > >> > drivers/usb/gad

RE: Fwd: Status of chipidea msm USB reset patch

2014-09-10 Thread Peter Chen
> On Fri, 2014-09-05 at 09:01 +0800, Peter Chen wrote: > > On Thu, Sep 04, 2014 at 07:47:40AM -0700, Tim Bird wrote: > > > On Fri, Aug 15, 2014 at 12:08 AM, Ivan T. Ivanov > wrote: > > > > On Fri, 2014-08-15 at 08:23 +0800, Peter Chen wrote: > > > >> On Thu, Aug 14, 2014 at 11:54:02AM -0500, Fel

[PATCH 4/4] usb: renesas_usbhs: fix usbhs_pipe_clear() for DCP PIPE

2014-09-10 Thread Yoshihiro Shimoda
Since the DCPCTR doesn't have the ACLRM bit, the usbus_pipe_clear() should not call the usbhsp_pipectrl_set() with ACLRM. So, this patch fixes this issue to add the usbhs_fifo_clear_dcp() in fifo.c because the controller needs the CFIFO to clear the DCP PIPE. Signed-off-by: Yoshihiro Shimoda ---

[PATCH 3/4] usb: renesas_usbhs: fix the timing of dcp_control_transfer_done

2014-09-10 Thread Yoshihiro Shimoda
According to the datasheet, this driver should clear the INTSTS0.CTRT bit before this controller detects the next stage transition. Otherwise, the driver may not be able to clear the bit after the controller went to the next stage transition. After that, the driver will not be able to clear the INT

[PATCH 2/4] usb: renesas_usbhs: gadget: fix the behavior of pullup

2014-09-10 Thread Yoshihiro Shimoda
This patch fixes an issue that this driver always enable the D+ pullup after it detected the VBUS connection even though this usb controller can control the D+ pullup timing by software. So, this driver should enable the D+ pullup after a gadget driver called usb_gadget_connect(). Signed-off-by: T

[PATCH 0/4] usb: renesas_usbhs: fixes this driver in gadget mode (part2)

2014-09-10 Thread Yoshihiro Shimoda
If we tested this driver as gadget, some issues below happened: - Oops happened if g_audio. - A usb enumeration may fail if we do insmod during connected the usb cable. - A transaction will not finish if g_zero. - A usb enumeration may fail after we re-connected the usb cable. This patch seria

  1   2   >