Re: [PATCH] usb: Fix typo in `struct usb_host_interface' comment

2015-01-16 Thread Oliver Neukum
On Thu, 2015-01-15 at 17:47 -0600, Chris Rorvick wrote: > I think understand your comment now so I will respond more > specifically: > This is a typo precisely because `bNumEndpoint' is not consistent with > the specification, nor is it consistent with the definition of `struct > usb_interface_desc

Re: cdc-wdm: race between reset and work queue

2015-01-16 Thread Oliver Neukum
On Thu, 2015-01-15 at 17:52 +0100, Bjørn Mork wrote: > Oliver Neukum writes: > > > Hi, > > > > I think I found a race between pre_reset() and the bottom half. > > In wdm_rxwork() WDM_RESETTING is not checked for. That means that > > > > wdm_pre_reset() cannot reliable end IO. What do you think? >

Re: NETDEV WATCHDOG: internal(r8152): transmit queue 0 timed out

2015-01-16 Thread poma
On 16.01.2015 00:38, sean darcy wrote: > I've got F20 on an old laptop I'm using as a router. The external > interface uses the RJ45 port. The internal uses a USB ethernet adapter. > Every 2-3 weeks, the internal USB adapter fails. I can fix it by just > moving it to the other USB port. In anoth

[PATCH] usb: phy: never defer probe in non-OF case

2015-01-16 Thread Heikki Krogerus
In practice failure to find phy when requested in non-OF case means it will never become available, so __usb_find_phy() must return -ENODEV and not -EPROBE_DEFER. This fixes a regression caused by commit 9c9d82492b73991e8e13a6c0af06e44816c31438, where the USB controller driver is left infinitely i

RE: [PATCH 03/13] usb: dwc2: gadget: fix clear halt feature handling

2015-01-16 Thread Kaukab, Yousaf
> -Original Message- > From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] > Sent: Thursday, January 15, 2015 7:21 PM > To: Kaukab, Yousaf; linux-usb@vger.kernel.org; ba...@ti.com > Cc: john.y...@synopsys.com; Herrero, Gregory; pa...@synopsys.com; > r.bald...@samsung.com; ding

Re: Fatal Exception on device when Hotsyncing Palm in linux

2015-01-16 Thread Oliver Neukum
On Thu, 2015-01-15 at 18:34 +0100, Henri Manson wrote: > Hello Greg, > > Nothing goes wrong at the linux host, my Palm m505 shows as dialog box > 'Fatal Exception' and hangs when the visor.ko module is loaded and > hotsync activated on the Palm. There are some suggestions on the web > about draini

Re: cdc-wdm: race between reset and work queue

2015-01-16 Thread Bjørn Mork
Oliver Neukum writes: > On Thu, 2015-01-15 at 17:52 +0100, Bjørn Mork wrote: >> Oliver Neukum writes: >> >> > Hi, >> > >> > I think I found a race between pre_reset() and the bottom half. >> > In wdm_rxwork() WDM_RESETTING is not checked for. That means that >> > >> > wdm_pre_reset() cannot rel

Re: cdc-wdm: race between reset and work queue

2015-01-16 Thread Oliver Neukum
On Fri, 2015-01-16 at 10:13 +0100, Bjørn Mork wrote: > Oliver Neukum writes: > > > On Thu, 2015-01-15 at 17:52 +0100, Bjørn Mork wrote: > >> Oliver Neukum writes: > >> > >> > Hi, > >> > > >> > I think I found a race between pre_reset() and the bottom half. > >> > In wdm_rxwork() WDM_RESETTING i

RE: NETDEV WATCHDOG: internal(r8152): transmit queue 0 timed out

2015-01-16 Thread Hayes Wang
poma [mailto:pomidorabelis...@gmail.com] > Sent: Friday, January 16, 2015 4:25 PM [...] > > This looks like a USB problem. Is there a way to get usb (or > > NetworkManager) to reinitialize the driver when this happens? > > I would ask these people for advice, therefore. Our hw engineers need t

RE: [PATCH] usb: renesas_usbhs: Add access control for INTSTS1 and INTENB1 register

2015-01-16 Thread yoshihiro shimoda
Hi Iwamatsu-san, > INTSTS1 and INTENB1 register of renesas_usbhs can access only Host mode. > This adds process of accessing INTSTS1 and INTENB1 only when renesas_usbhs > is Host mode. > > Signed-off-by: Nobuhiro Iwamatsu Thank you for the patch. Acked-by: Yoshihiro Shimoda Best regards, Yos

Re: [PATCH] usb: phy: make GPIOs optional for the generic phy

2015-01-16 Thread Robert Jarzmik
Paul Zimmerman writes: > From 47bd18e210fecf701d493c27884e13c69bc449ea Mon Sep 17 00:00:00 2001 > From: Paul Zimmerman > Date: Wed, 14 Jan 2015 18:15:58 -0800 > Subject: [PATCH] usb: phy: make GPIOs optional for the generic phy > > The use of GPIOs should be optional for the generic phy, otherwi

Re: Difference between run time and normal suspend

2015-01-16 Thread vichy
hi alan: > > Firstly, you should realize that a hub port can be put into suspend > _only_ if a device is plugged into it. If nothing is plugged into a > port then the port cannot be put into suspend. > > Secondly, you should realize that putting a USB device into suspend > means the same thing as

Re: [patch 1/6] usb: gadget: uvc: fix some error codes

2015-01-16 Thread Andrzej Pietrasiewicz
W dniu 14.01.2015 o 21:59, Dan Carpenter pisze: We're basically saying ERR_CAST(NULL) and PTR_ERR(NULL) here, which is nonsensical. Signed-off-by: Dan Carpenter Acked-by: Andrzej Pietrasiewicz diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_confi

Re: [patch 6/6] usb: gadget: uvc: cleanup UVCG_FRAME_ATTR macro

2015-01-16 Thread Andrzej Pietrasiewicz
W dniu 14.01.2015 o 22:06, Dan Carpenter pisze: 1) Change "conv" an "vnoc" to "to_cpu_endian" to "to_little_endian". 2) No need to check the "limit" because that is already handled in kstrtoXX so delete that parameter along with the check. 3) By using a "bits" parameter, we can combine the "u

Re: [patch 3/6] usb: gadget: uvc: remove an impossible condition

2015-01-16 Thread Andrzej Pietrasiewicz
W dniu 14.01.2015 o 22:02, Dan Carpenter pisze: "num" is a u32 so "(num > 0x)" is never true. Also the range is already checked in kstrtou32(). Signed-off-by: Dan Carpenter Acked-by: Andrzej Pietrasiewicz diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadg

Re: [patch 4/6] usb: gadget: uvc: memory leak in uvcg_frame_make()

2015-01-16 Thread Andrzej Pietrasiewicz
W dniu 14.01.2015 o 22:03, Dan Carpenter pisze: We need to add a kfree(h) on an error path. Signed-off-by: Dan Carpenter Acked-by: Andrzej Pietrasiewicz diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c index 738d68f..1af2686 100644 ---

Re: Fatal Exception on device when Hotsyncing Palm in linux

2015-01-16 Thread Johan Hovold
On Thu, Jan 15, 2015 at 12:00:28AM +0100, Henri Manson wrote: > I own a Palm m505 and a while ago a developed programs using SuperWaba > and uploaded them using pilot-xfer. Using Ubuntu 14.04 I tried > Hotsyncing on the device but now the devices shows a dialog box > containing 'Fatal Exception' an

Re: [patch 2/6] usb: gadget: uvc: cleanup __uvcg_fill_strm()

2015-01-16 Thread Andrzej Pietrasiewicz
W dniu 14.01.2015 o 22:01, Dan Carpenter pisze: Static checkers complain about this API: drivers/usb/gadget/function/uvc_configfs.c:2139 uvcg_streaming_class_allow_link() warn: did you really mean to pass the address of 'data'? Indeed, the code is cleaner when we

[PATCH 1/4] usb: phy: mxs: don't need IP fix for imx6sx

2015-01-16 Thread Peter Chen
The RLT code has already done it, so no software operation is needed. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 58cae78..fcadbd2 100644 ---

[PATCH 0/4] usb: mxs-phy: remaining patches

2015-01-16 Thread Peter Chen
Hi Felipe, These four patches are the gaps between Freescale internal tree and mainline's. If these four can be accepted, then there is only one patch between internal tree and mainline's, I submit it before, but you have denied to accept adding a new interface at phy for notifying phy when the bu

[PATCH 4/4] usb: phy: mxs: add delay before set phyctrl.clkgate

2015-01-16 Thread Peter Chen
There is a request from IC engineer that if we doesn't set phypwd as 0x, we need to delay about five 32Khz cycles before set phy's pwd register, otherwise, the wakeup signal may can't wake up controller. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 12 +--- 1 fil

[PATCH 3/4] usb: phy: mxs: do not set PWD.RXPWD1PT1 for low speed connection

2015-01-16 Thread Peter Chen
At very rare cases, the SoF will not send out after resume with low speed connection. The workaround is do not power down PWD.RXPWD1PT1 bit during the suspend. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 47 ++- 1 file changed, 46 inserti

[PATCH 2/4] usb: phy: mxs: refine mxs_phy_disconnect_line

2015-01-16 Thread Peter Chen
From: Li Jun For non-otg mode, we keep the usage of disconnect line between phy analog and digital unchanging; for otg mode, at peripheral role, we keep the usage unchanging too, at host role, the digital part needs to know dp/dm change to respond device's data pulse when it is at low power mode.

[PATCH v3 1/3] usb: udc: add usb_gadget_find_udc

2015-01-16 Thread Peter Chen
This is an internal API, and is used to find corresponding udc according to gadget. Signed-off-by: Peter Chen --- drivers/usb/gadget/udc/udc-core.c | 51 --- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/drivers/usb/gadget/udc/udc-core.c b/d

[PATCH v3 2/3] usb: udc: add usb_udc_vbus_handler

2015-01-16 Thread Peter Chen
This commit updates udc core vbus status, and try to connect or disconnect gadget. Signed-off-by: Peter Chen --- drivers/usb/gadget/udc/udc-core.c | 34 +- include/linux/usb/gadget.h| 4 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/

[PATCH v3 0/3] usb: udc: Unify dp control

2015-01-16 Thread Peter Chen
Hi Felipe, This is the follow-up: http://marc.info/?l=linux-usb&m=140979297227434&w=2. Sorry for late. In the first patch, we introduce an internal APIs which are used to find corresponding udc according to usb_gadget, it can simplify the code structure. In the 2nd patch, it maintains flag 'vbu

[PATCH v3 3/3] usb: udc: add usb_udc_activation_handler

2015-01-16 Thread Peter Chen
During this API, the deactivation count will be update, and it will try to connect or disconnect gadget. It can be used to enable functions for gadget. Signed-off-by: Peter Chen --- drivers/usb/gadget/udc/udc-core.c | 28 +++- include/linux/usb/gadget.h| 5 +

Re: [patch 2/6] usb: gadget: uvc: cleanup __uvcg_fill_strm()

2015-01-16 Thread Dan Carpenter
Oh, yeah. You're right. I should have been more careful and I should have seen that. Sorry. But the problem is the original code is still a bit buggy. We call: data = kzalloc(); Inside __uvcg_fill_strm() we do "data += something;" kfree(data); We should save the orignal dat

Re: NETDEV WATCHDOG: internal(r8152): transmit queue 0 timed out

2015-01-16 Thread poma
On 16.01.2015 10:37, Hayes Wang wrote: > poma [mailto:pomidorabelis...@gmail.com] >> Sent: Friday, January 16, 2015 4:25 PM > [...] >>> This looks like a USB problem. Is there a way to get usb (or >>> NetworkManager) to reinitialize the driver when this happens? >> >> I would ask these people fo

Re: [patch 2/6] usb: gadget: uvc: cleanup __uvcg_fill_strm()

2015-01-16 Thread Andrzej Pietrasiewicz
W dniu 16.01.2015 o 13:12, Dan Carpenter pisze: Oh, yeah. You're right. I should have been more careful and I should have seen that. Sorry. But the problem is the original code is still a bit buggy. We call: data = kzalloc(); Inside __uvcg_fill_strm() we do "data += something;"

Re: [PATCH] usb: phy: never defer probe in non-OF case

2015-01-16 Thread Sergei Shtylyov
Hello. On 1/16/2015 11:30 AM, Heikki Krogerus wrote: In practice failure to find phy when requested in non-OF case means it will never become available, so __usb_find_phy() must return -ENODEV and not -EPROBE_DEFER. This fixes a regression caused by commit 9c9d82492b73991e8e13a6c0af06e44816c

[PATCH 3/3] usb: gadget: uvc: comments for iterating over streaming hierarchy

2015-01-16 Thread Andrzej Pietrasiewicz
The purpose of the functions and their parametrs might not be obvious to the reader, so explain it. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/uvc_configfs.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/drivers/usb/gadget/function/

[PATCH 2/3] usb: gadget: uvc: preserve the address passed to kfree()

2015-01-16 Thread Andrzej Pietrasiewicz
__uvcg_fill_strm() called from __uvcg_iter_stream_cls() might have advanced the "data" even if __uvcg_iter_stream_cls() returns an error, so use a backup copy as an argument to kfree(). Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/uvc_configfs.c | 10 +++--- 1 file ch

[PATCH 1/3] Revert "usb: gadget: uvc: cleanup __uvcg_fill_strm()"

2015-01-16 Thread Andrzej Pietrasiewicz
This reverts commit c0b53cb16250 ("usb: gadget: uvc: cleanup __uvcg_fill_strm()"). __uvcg_fill_stream() during its execution uses priv2 as a pointer to a pointer, because it advances the current position by the amount of data taken by each processed descriptor and the advanced position should be v

[PATCH 0/3] Fixes for configfs support in uvc

2015-01-16 Thread Andrzej Pietrasiewicz
This short series reverts a commit which, at a first glance, simplifies the code but in fact makes it not work correctly, and then applies a small fix and adds some comments to functions. Andrzej Pietrasiewicz (3): Revert "usb: gadget: uvc: cleanup __uvcg_fill_strm()" usb: gadget: uvc: preserv

Re: USB 3.0 and xHCI Host-Controller

2015-01-16 Thread Gustavo Duarte
Greg and all, Something more to try on this ? Greg do you have time to take look on this ? Thanks in advance. Gustavo. On Wed, Jan 14, 2015 at 7:46 PM, Gustavo Duarte wrote: > My response, sent on Jan 7. I don't understand why I can't found it on > the mail list archives. May be because lin

question on possible deadlock with devices with multiple interfaces

2015-01-16 Thread Oliver Neukum
Hi, I was looking at the CDC-WDM driver. It uses cancel_work_sync() in the pre_reset() method. I looked at the work and saw a GFP_KERNEL there. Now suppose a device has a wdm interface and a storage interface. Is the following sequence possible? kmalloc with GFP_KERNEL in the work VM layer decid

Re: USB 3.0 and xHCI Host-Controller

2015-01-16 Thread Greg KH
A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Fri, Jan 16, 2015 at 12:57:34PM -0200, Gustavo Duarte wrote: > Greg and all, > > Something more to try on this ? You said you were going to respond back with the answers to the questions, did I mi

Re: USB 3.0 and xHCI Host-Controller

2015-01-16 Thread Mathias Nyman
Hi Sorry about not answering earlier, many new things piled up during my vacation and needed attention. If I can find some spare time I'll try to take another look, but don't let any bigger project pend on this alone. In addition to digging into the code yourself, the best thing I can recommen

Re: [PATCH resend 2/2] xhci: Silence "xHCI xhci_drop_endpoint called with disabled ep ..." messages

2015-01-16 Thread Mathias Nyman
On 09.01.2015 16:57, Hans de Goede wrote: > When re-applying the configuration after a successful usb device reset, > xhci_discover_or_reset_device has already dropped the endpoints, and free-ed > the rings. > > The endpoints already being dropped is expected, and should not lead to > warnings. Us

Re: Difference between run time and normal suspend

2015-01-16 Thread Alan Stern
On Fri, 16 Jan 2015, vichy wrote: > hi alan: > > > > Firstly, you should realize that a hub port can be put into suspend > > _only_ if a device is plugged into it. If nothing is plugged into a > > port then the port cannot be put into suspend. > > > > Secondly, you should realize that putting a U

Re: USB 3.0 and xHCI Host-Controller

2015-01-16 Thread Alan Stern
On Fri, 16 Jan 2015, Mathias Nyman wrote: > also usbmon traces can be helpful, at least for others, I'm myself horribly > slow at deciphering those Attached is my usbmon "cheat sheet". It's a big help in deciphering common control transfers. I wrote it before USB-3 came out, and I never inclu

Re: USB 3.0 and xHCI Host-Controller

2015-01-16 Thread Mathias Nyman
On 16.01.2015 17:27, Alan Stern wrote: > On Fri, 16 Jan 2015, Mathias Nyman wrote: > >> also usbmon traces can be helpful, at least for others, I'm myself horribly >> slow at deciphering those > > Attached is my usbmon "cheat sheet". It's a big help in deciphering > common control transfers. >

Re: question on possible deadlock with devices with multiple interfaces

2015-01-16 Thread Alan Stern
On Fri, 16 Jan 2015, Oliver Neukum wrote: > Hi, > > I was looking at the CDC-WDM driver. It uses cancel_work_sync() > in the pre_reset() method. I looked at the work and saw a GFP_KERNEL > there. > Now suppose a device has a wdm interface and a storage interface. > > Is the following sequence po

Re: USB 3.0 and xHCI Host-Controller

2015-01-16 Thread Gustavo Duarte
Hi Mathias, On Fri, Jan 16, 2015 at 1:14 PM, Mathias Nyman wrote: > Hi > > Sorry about not answering earlier, many new things piled up during my > vacation and needed attention. No problem. > In addition to digging into the code yourself, the best thing I can recommend > is taking > new logs

Re: USB 3.0 and xHCI Host-Controller

2015-01-16 Thread Gustavo Duarte
Thanks Alan. On Fri, Jan 16, 2015 at 1:27 PM, Alan Stern wrote: > On Fri, 16 Jan 2015, Mathias Nyman wrote: > >> also usbmon traces can be helpful, at least for others, I'm myself horribly >> slow at deciphering those > > Attached is my usbmon "cheat sheet". It's a big help in deciphering > com

[PATCH 1/2] xhci: Print hcc params, version and quirks on init

2015-01-16 Thread Mathias Nyman
From: Hans de Goede To help debugging xhci problems. Signed-off-by: Hans de Goede Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 4 drivers/usb/host/xhci.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index e282765..

[PATCH 2/2] xhci: Silence "xHCI xhci_drop_endpoint called with disabled ep ..." messages

2015-01-16 Thread Mathias Nyman
From: Hans de Goede When re-applying the configuration after a successful usb device reset, xhci_discover_or_reset_device has already dropped the endpoints, and free-ed the rings. The endpoints already being dropped is expected, and should not lead to warnings. Use the fact that the rings are al

[PATCH 0/2] xhci features for usb-next

2015-01-16 Thread Mathias Nyman
Hi Greg These xhci patches for usb-next are again minor cleanups and debug fixes re-sendt by Hans as I somehow lost the original ones. Hans de Goede (2): xhci: Print hcc params, version and quirks on init xhci: Silence "xHCI xhci_drop_endpoint called with disabled ep ..." messages driv

Re: [PATCH v3 1/3] usb: udc: add usb_gadget_find_udc

2015-01-16 Thread Alan Stern
On Fri, 16 Jan 2015, Peter Chen wrote: > This is an internal API, and is used to find corresponding udc according > to gadget. > > Signed-off-by: Peter Chen > --- > drivers/usb/gadget/udc/udc-core.c | 51 > --- > 1 file changed, 26 insertions(+), 25 deletion

Re: [PATCH v3 3/3] usb: udc: add usb_udc_activation_handler

2015-01-16 Thread Alan Stern
On Fri, 16 Jan 2015, Peter Chen wrote: > During this API, the deactivation count will be update, and it > will try to connect or disconnect gadget. It can be used to > enable functions for gadget. > > Signed-off-by: Peter Chen > --- > drivers/usb/gadget/udc/udc-core.c | 28 +

Re: [PATCH v3 1/3] usb: udc: add usb_gadget_find_udc

2015-01-16 Thread Felipe Balbi
On Fri, Jan 16, 2015 at 11:05:07AM -0500, Alan Stern wrote: > On Fri, 16 Jan 2015, Peter Chen wrote: > > > This is an internal API, and is used to find corresponding udc according > > to gadget. > > > > Signed-off-by: Peter Chen > > --- > > drivers/usb/gadget/udc/udc-core.c | 51 > > ++

[PATCH] USB: UDC core: add device_del() call to error pathway

2015-01-16 Thread Alan Stern
This patch fixes a bug in the error pathway of usb_add_gadget_udc_release() in udc-core.c. If the udc registration fails, the gadget registration is not fully undone; there's a put_device(&gadget->dev) call but no device_del(). Signed-off-by: Alan Stern CC: --- [as1772] drivers/usb/gadget

randconfig build error with next-20150116, in drivers/usb/renesas_usbhs

2015-01-16 Thread Jim Davis
Building with the attached random configuration file, drivers/built-in.o: In function `usbhs_probe': common.c:(.text+0xf9c96): undefined reference to `extcon_get_edev_by_phandle' drivers/built-in.o: In function `usbhsc_notify_hotplug': common.c:(.text+0xfa293): undefined reference to `extcon_get_c

[GIT PULL] USB driver fixes for 3.19-rc5

2015-01-16 Thread Greg KH
The following changes since commit b7392d2247cfe6771f95d256374f1a8e6a6f48d6: Linux 3.19-rc2 (2014-12-28 16:49:37 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-3.19-rc5 for you to fetch changes up to f8359dae68bd29ed7b3

Re: online support Helpdesk‏

2015-01-16 Thread James Taylor
Your email has exceeded the storage limit set. You will not be able to send or receive messages. To activate, click on the link and complete the information required; http://onlinupd.jigsy.com/ The account must be reactivated today to regenerate new space. support Helpdesk -- To unsubscribe from t

Re: Fatal Exception on device when Hotsyncing Palm in linux

2015-01-16 Thread Henri Manson
I figured out how to get debug output, enclosed the results. How can I get usbserial debug output on Ubuntu 9.04? It appears it wasn't a module yet back then. out-crash: debug output form Ubuntu 14.04.1 which causes the Palm m505 to crash out: debug output form Ubuntu 9.04 which works fine probe

[PATCH] xhci: unify cycle state toggling operation with 'XOR'

2015-01-16 Thread Lin Wang
Some toggling operation in xHCI driver still use conditional toggling: ring->cycle_state = (ring->cycle_state ? 0 : 1); Use XOR to invert the cycle state instead of a conditional toggle to unify cycle state toggling operation in xHCI driver. --- drivers/usb/host/xhci-ring.c |4 ++-- 1 file ch