Re: [PATCH v3 1/3] usb: udc: allow adding and removing the same gadget device

2017-04-11 Thread Felipe Balbi
Hi, Alan Stern writes: >> >> >> >> --- a/drivers/usb/gadget/udc/core.c >> >> >> >> +++ b/drivers/usb/gadget/udc/core.c >> >> >> >> @@ -1273,6 +1273,7 @@ void usb_del_gadget_udc(struct usb_gadget >> >> >> >> *gadget) >> >> >> >> flush_work(&gadget->work); >> >> >> >> device_unregister(&u

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-04-11 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >> Felipe Balbi writes: >>> Thinh Nguyen writes: This patch fixes a commit that causes a hang from device waiting for data with the wrong sequence number. The commit ffb80fc672c3 ("usb: dwc3: gadget: skip Set/Clear Halt when invalid") adds a check to ret

Re: [PATCH 3/3] usb: gadget: f_mass_storage: Serialize wake and sleep execution

2017-04-11 Thread Felipe Balbi
Hi, Alan Stern writes: > Felipe, was this patch meant to solve the problem you encountered in > your "Memory barrier needed with wake_up_process()?" email thread last > fall? it certainly smells like it, but Thinh Nguyen didn't say for sure :-) -- balbi signature.asc Description: PGP signat

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-11 Thread Felipe Balbi
Hi, John Youn writes: >> Thinh Nguyen writes: >>> The dwc3 driver can overwite its previous events if its top half IRQ >>> handler gets invoked again before processing the events in the cache. We >> >> interrupts are masked, why would top half get invoked again? Is this, >> perhaps, related to

[GIT PULL] USB changes for v4.12 merge window

2017-04-11 Thread Felipe Balbi
Hi Greg, here's my pull request for v4.12 merge window. Changes have been tested for Intel Edison where applicable. They have also been soaking for linux-next for a while. Let me know if you want anything to be changed. There will be a conflict on drivers/usb/gadget/udc/{Kconfig,amd5536udc.c} wh

Re: [PATCH net-next 14/14] usbnet: pegasus: Use net_device_stats from struct net_device

2017-04-11 Thread Petko Manolov
On 17-04-07 10:17:39, Tobias Klauser wrote: > Instead of using a private copy of struct net_device_stats in struct pegasus, > use stats from struct net_device. Also remove the now unnecessary > .ndo_get_stats function. Looks OK to me. Petko > Cc: Petko Manolov > Cc: linux-us

Re: [PATCH net-next 13/14] usbnet: kaweth: Use net_device_stats from struct net_device

2017-04-11 Thread Oliver Neukum
Am Freitag, den 07.04.2017, 10:17 +0200 schrieb Tobias Klauser: > Instead of using a private copy of struct net_device_stats in struct > kaweth_device, use stats from struct net_device. Also remove the now > unnecessary .ndo_get_stats function. > > Cc: linux-usb@vger.kernel.org > Signed-off-by: To

Re: [PATCH v3 1/3] usb: udc: allow adding and removing the same gadget device

2017-04-11 Thread Alan Stern
On Tue, 11 Apr 2017, Felipe Balbi wrote: > > Oddly enough, yes. But it doesn't explain why this code doesn't blow > > up every time it gets called, in its current form. > > Well, it does :-) > > dev_get_drvdata(_dev) -> NULL -> kfree(NULL) > > We're just leaking memory. I guess a patch like b

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-04-11 Thread Rolf Evers-Fischer
Hi, Christian Gromm writes: > we observe an issue with a td_list running empty and an > endpoint being stalled at the same time on > > Linux ihu-low 4.1.27-abl #1 SMP PREEMPT Mon Mar 20 13:51:51 CET 2017 > x86_64 x86_64 x86_64 GNU/Linux. we've recently observed the same problem with "Linux ihu-

Re: [PATCH v3 3/6] usb: usbip tool: Check the return of get_nports()

2017-04-11 Thread Greg KH
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Tue, Apr 11, 2017 at 06:3

Re: [PATCH v3 1/3] usb: udc: allow adding and removing the same gadget device

2017-04-11 Thread Greg KH
On Tue, Apr 11, 2017 at 10:12:01AM -0400, Alan Stern wrote: > On Tue, 11 Apr 2017, Felipe Balbi wrote: > > > > Oddly enough, yes. But it doesn't explain why this code doesn't blow > > > up every time it gets called, in its current form. > > > > Well, it does :-) > > > > dev_get_drvdata(_dev) -

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-04-11 Thread Christian Gromm
On 04/11/2017 04:13 PM, Rolf Evers-Fischer wrote: Hi, Christian Gromm writes: we observe an issue with a td_list running empty and an endpoint being stalled at the same time on Linux ihu-low 4.1.27-abl #1 SMP PREEMPT Mon Mar 20 13:51:51 CET 2017 x86_64 x86_64 x86_64 GNU/Linux. we've recen

Re: [PATCH 3/3] usb: gadget: f_mass_storage: Serialize wake and sleep execution

2017-04-11 Thread Alan Stern
On Mon, 10 Apr 2017, Thinh Nguyen wrote: > To fix this problem, both the smp_rmb() in sleep_thread() and the > smp_wmb() in wakeup_thread() should be changed to smp_mb(). > > Wouldn't it be sufficient to have smp_mb() just either in the > sleep_thread() or the wakeup_thread() in this c

Re: [GIT PULL] USB changes for v4.12 merge window

2017-04-11 Thread Greg KH
On Tue, Apr 11, 2017 at 11:13:55AM +0300, Felipe Balbi wrote: > > Hi Greg, > > here's my pull request for v4.12 merge window. Changes have been tested > for Intel Edison where applicable. They have also been soaking for > linux-next for a while. Let me know if you want anything to be changed. >

Re: [PATCH v3 3/6] usb: usbip tool: Check the return of get_nports()

2017-04-11 Thread Shuah Khan
On 04/10/2017 04:38 PM, Yuyang Du wrote: > Hi Shuah, > > Could you please take a look at these patches? I got more patches > that sit on these to send out. Please bear with me. I was out sick most of last week. Still catching up. Go ahead and send the patches, no need to wait. > > Thanks, > Yuy

Re: [PATCH v2 00/21] Convert USB documentation to ReST format

2017-04-11 Thread Greg Kroah-Hartman
On Sat, Apr 08, 2017 at 10:04:33PM +0200, Greg Kroah-Hartman wrote: > On Sat, Apr 08, 2017 at 11:23:28AM -0600, Jonathan Corbet wrote: > > On Wed, 5 Apr 2017 10:22:54 -0300 > > Mauro Carvalho Chehab wrote: > > > > > Currently, there are several USB core documents that are at either > > > written

[PATCH] chipidea: Fix issue in reconnecing gadget without insmod/rmmod

2017-04-11 Thread Niranjan Dighe
Currently usb_gadget_connect() is called only through gadget registration via composite_driver_probe(). As a result, after a disconnection, if the role transitions to host and back to gadget, the gadget is not recognized by the host anymore. This is a typical scenario with an iAP device in the foll

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-11 Thread John Youn
On 04/10/2017 11:58 PM, Felipe Balbi wrote: > > Hi, > > John Youn writes: Yes it will re-assert. The interrupt line will remain asserted as long events remain in the buffer and it is not masked. So when we eventually unmask, the interrupt will be reasserted again immediately. >

RE: [PATCH 3/3] usb: dwc3: ep0: improve handling of unaligned OUT requests

2017-04-11 Thread David Laight
From: Felipe Balbi > Sent: 07 April 2017 12:37 > Just like we did for all other endpoint types, let's rely on a chained > TRB pointing to ep0_bounce_addr in order to align transfer size. This > will make the code simpler. ... Is the dwc3 similar enough to xhci to have an 'immediate data' bit? If s

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-11 Thread John Youn
On 04/11/2017 12:45 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >>> Thinh Nguyen writes: The dwc3 driver can overwite its previous events if its top half IRQ handler gets invoked again before processing the events in the cache. We >>> >>> interrupts are masked, why would top h

Re: [PATCH] chipidea: Fix issue in reconnecing gadget without insmod/rmmod

2017-04-11 Thread kbuild test robot
Hi Niranjan, [auto build test ERROR on usb/usb-testing] [also build test ERROR on v4.11-rc6] [cannot apply to next-20170411] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Niranjan-Dighe

Re: [PATCH] chipidea: Fix issue in reconnecing gadget without insmod/rmmod

2017-04-11 Thread kbuild test robot
Hi Niranjan, [auto build test ERROR on usb/usb-testing] [also build test ERROR on v4.11-rc6] [cannot apply to next-20170411] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Niranjan-Dighe

Re: [PATCH v2 00/21] Convert USB documentation to ReST format

2017-04-11 Thread Mauro Carvalho Chehab
Em Tue, 11 Apr 2017 16:58:40 +0200 Greg Kroah-Hartman escreveu: > On Sat, Apr 08, 2017 at 10:04:33PM +0200, Greg Kroah-Hartman wrote: > > On Sat, Apr 08, 2017 at 11:23:28AM -0600, Jonathan Corbet wrote: > > > On Wed, 5 Apr 2017 10:22:54 -0300 > > > Mauro Carvalho Chehab wrote: > > > > > >

Re: [PATCH v2 00/21] Convert USB documentation to ReST format

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 03:36:39PM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 11 Apr 2017 16:58:40 +0200 > Greg Kroah-Hartman escreveu: > > > On Sat, Apr 08, 2017 at 10:04:33PM +0200, Greg Kroah-Hartman wrote: > > > On Sat, Apr 08, 2017 at 11:23:28AM -0600, Jonathan Corbet wrote: > > > > On

Re: [PATCH v2 00/21] Convert USB documentation to ReST format

2017-04-11 Thread Jonathan Corbet
On Tue, 11 Apr 2017 16:58:40 +0200 Greg Kroah-Hartman wrote: > Nope, they don't apply to my tree, it was probably based on yours. And > the first two are ones I shouldn't be taking. > > So, feel free to take all of these with a: > Acked-by: Greg Kroah-Hartman > for the USB-related patche

[bug report] usb: xhci: Add helper function xhci_set_power_on().

2017-04-11 Thread Dan Carpenter
Hello Guoqing Zhang, The patch a6ff6cbf1fab: "usb: xhci: Add helper function xhci_set_power_on()." from Apr 7, 2017, leads to the following static checker warning: drivers/usb/host/xhci-hub.c:575 xhci_set_port_power() error: calling 'spin_unlock_irqrestore()' with bogus flags dri

Re: [PATCH 3/3] usb: gadget: f_mass_storage: Serialize wake and sleep execution

2017-04-11 Thread Thinh Nguyen
On 4/11/2017 7:35 AM, Alan Stern wrote: On Mon, 10 Apr 2017, Thinh Nguyen wrote: To fix this problem, both the smp_rmb() in sleep_thread() and the smp_wmb() in wakeup_thread() should be changed to smp_mb(). Wouldn't it be sufficient to have smp_mb() just either in the sleep_thread() or the wa

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-04-11 Thread Thinh Nguyen
On 4/11/2017 12:36 AM, Felipe Balbi wrote: Hi, Thinh Nguyen writes: Felipe Balbi writes: Thinh Nguyen writes: This patch fixes a commit that causes a hang from device waiting for data with the wrong sequence number. The commit ffb80fc672c3 ("usb: dwc3: gadget: skip Set/Clear Halt when inv

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-11 Thread John Youn
On 04/11/2017 09:31 AM, John Youn wrote: > On 04/11/2017 12:45 AM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn writes: Thinh Nguyen writes: > The dwc3 driver can overwite its previous events if its top half IRQ > handler gets invoked again before processing the events in the cache.

RE: [PATCH 0/3] usb: host: xhci-plat: add support suspend/resume for R-Car

2017-04-11 Thread Yoshihiro Shimoda
Hi Mathias, > From: Yoshihiro Shimoda, Sent: Friday, March 17, 2017 7:03 PM > > This patch adds support suspend/resume for R-Car controllers. > The controllers need firmware downloading and the current code has > such process only when probe timing. After suspend the system and > the power of con

Re: [PATCH] smsc95xx: Add comments to the registers definition

2017-04-11 Thread David Miller
From: Andrew Lunn Date: Mon, 10 Apr 2017 15:52:51 +0200 > Hi Martin > >> @@ -2032,7 +2032,7 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet >> *dev, >> skb_push(skb, 4); >> tx_cmd_b = (u32)(skb->len - 4); >> if (csum) >> -tx_cmd_b |= TX_CMD_B_CSUM_ENABLE; >>

Re: [PATCH v3 3/6] usb: usbip tool: Check the return of get_nports()

2017-04-11 Thread Yuyang Du
Hi Greg, On Tue, Apr 11, 2017 at 04:13:50PM +0200, Greg KH wrote: > > Please send patches out, no need to wait, I'll just wait to apply them > for the review, you can always build on top of previous series. Got it. Thank you. Yuyang -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v3 3/6] usb: usbip tool: Check the return of get_nports()

2017-04-11 Thread Yuyang Du
On Tue, Apr 11, 2017 at 08:51:13AM -0600, Shuah Khan wrote: > > Please bear with me. I was out sick most of last week. till catching Hope you are all well now :) > Could you please pick this up. > > Acked-by: Shuah Khan Thanks, Shuah. Yuyang -- To unsubscribe from this list: send the line "un

RE: [PATCH 3/3] usb: dwc3: ep0: improve handling of unaligned OUT requests

2017-04-11 Thread Felipe Balbi
David Laight writes: > From: Felipe Balbi >> Sent: 07 April 2017 12:37 >> Just like we did for all other endpoint types, let's rely on a chained >> TRB pointing to ep0_bounce_addr in order to align transfer size. This >> will make the code simpler. > ... > > Is the dwc3 similar enough to xhci to

RE: [PATCH 3/3] usb: dwc3: ep0: improve handling of unaligned OUT requests

2017-04-11 Thread Felipe Balbi
Hi, Felipe Balbi writes: >> From: Felipe Balbi >>> Sent: 07 April 2017 12:37 >>> Just like we did for all other endpoint types, let's rely on a chained >>> TRB pointing to ep0_bounce_addr in order to align transfer size. This >>> will make the code simpler. >> ... >> >> Is the dwc3 similar enoug

Re: [PATCH v3 1/3] usb: udc: allow adding and removing the same gadget device

2017-04-11 Thread Felipe Balbi
Hi, Greg KH writes: > On Tue, Apr 11, 2017 at 10:12:01AM -0400, Alan Stern wrote: >> On Tue, 11 Apr 2017, Felipe Balbi wrote: >> >> > > Oddly enough, yes. But it doesn't explain why this code doesn't blow >> > > up every time it gets called, in its current form. >> > >> > Well, it does :-) >

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-04-11 Thread Felipe Balbi
Hi, Thinh Nguyen writes: Felipe Balbi writes: > Thinh Nguyen writes: >> This patch fixes a commit that causes a hang from device waiting for >> data with the wrong sequence number. The commit ffb80fc672c3 ("usb: >> dwc3: gadget: skip Set/Clear Halt when invalid") adds a ch

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-11 Thread Felipe Balbi
Hi, John Youn writes: Do you think we introduce this when adding evt->cache in TH? Even without evt->cache we still could overwrite evt->count - so, was that seen before evt->cache? >>> >>> The multiple TH calls could have happened even before we introduced >>> evt->cache, but onl

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-11 Thread Felipe Balbi
Hi, John Youn writes: >> John Youn writes: Thinh Nguyen writes: > The dwc3 driver can overwite its previous events if its top half IRQ > handler gets invoked again before processing the events in the cache. We interrupts are masked, why would top half get invoked again?

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-11 Thread Felipe Balbi
Hi, John Youn writes: >>> John Youn writes: > Thinh Nguyen writes: >> The dwc3 driver can overwite its previous events if its top half IRQ >> handler gets invoked again before processing the events in the cache. We > > interrupts are masked, why would top half get invoked a

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-11 Thread Felipe Balbi
Hi, (Thinh, for whatever I didn't receive your email via the list, replying to myself) Felipe Balbi writes: >> Hmm, can you apply this patch and provide output when the failure >> happens? I suggest setting up a 100MiB trace buffer. You don't need to >> enable any tracers nor any event. trace_p

Re: [PATCH v3 1/3] usb: udc: allow adding and removing the same gadget device

2017-04-11 Thread Greg KH
On Wed, Apr 12, 2017 at 09:01:44AM +0300, Felipe Balbi wrote: > > Hi, > > Greg KH writes: > > On Tue, Apr 11, 2017 at 10:12:01AM -0400, Alan Stern wrote: > >> On Tue, 11 Apr 2017, Felipe Balbi wrote: > >> > >> > > Oddly enough, yes. But it doesn't explain why this code doesn't blow > >> > > u