Re: [PATCH 4/4] usb: dwc3: gadget: check if dep->frame_number is still valid

2018-11-14 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >> Felipe Balbi writes: >>> In the case of interval of 1ms, it will start on the next interval. frame_number + max(4, interval) will start at least 4 uframes in the future. In any case, what about immediately retry the START_TRANSFER command wi

Re: [RESEND PATCH v2] usb: dwc2: disable power_down on rockchip for regression

2018-11-14 Thread Felipe Balbi
Hal Emmerich writes: > From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001 > From: Hal Emmerich > Date: Thu, 19 Jul 2018 21:48:08 -0500 > Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices > >  The bug would let the usb controller enter partial power down, >  w

Re: [PATCH 4/4] usb: dwc3: gadget: check if dep->frame_number is still valid

2018-11-14 Thread Thinh Nguyen
On 11/14/2018 12:42 AM, Felipe Balbi wrote: > Hi, > > Thinh Nguyen writes: >>> Felipe Balbi writes: In the case of interval of 1ms, it will start on the next interval. > frame_number + max(4, interval) will start at least 4 uframes in the > future. > > In any case, what abou

Re: [PATCH 4/4] usb: dwc3: gadget: check if dep->frame_number is still valid

2018-11-14 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >>> If it fails for over 5 times in a row, then we should probably wait for >>> the next XferNotReady to get the frame_number again. Also 5 is an >>> arbitrary number I came up without any testing, we can probably decide >>> on a better number. What do you think? >> I ha

[PATCH] Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers"

2018-11-14 Thread Felipe Balbi
From: Shen Jing This reverts commit b4194da3f9087dd38d91b40f9bec42d59ce589a8 since it causes list corruption followed by kernel panic: Workqueue: adb ffs_aio_cancel_worker RIP: 0010:__list_add_valid+0x4d/0x70 Call Trace: insert_work+0x47/0xb0 __queue_work+0xf6/0x400 queue_work_on+0x65/0x70 dwc3_

[PATCH v2 2/4] usb: dwc3: trace: log ep commands in hex

2018-11-14 Thread Felipe Balbi
They are much more useful in hexadecimal than in decimal. Moreover, generic commands are already logged in hex. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h index f

[PATCH v2 1/4] usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc()

2018-11-14 Thread Felipe Balbi
Sometimes, errors happen when kicking transfers from __dwc3_gadget_start_isoc(). In those cases, we need to pass along the error so gadget driver can make informed decisions. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(

[PATCH v2 3/4] usb: dwc3: gadget: remove unnecessary dev_info()

2018-11-14 Thread Felipe Balbi
Running out of requests on isochronous endpoints is part of normal operation. We don't really need to know about it every time it happens. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/g

[PATCH v2 4/4] usb: dwc3: gadget: check if dep->frame_number is still valid

2018-11-14 Thread Felipe Balbi
Gadget driver may take an unbounded amount of time to queue requests after XferNotReady. This is important for isochronous endpoints which need to be started for a specific (micro-)frame. If we fail to start a transfer for isochronous endpoint, let's try queueing to a future interval and see if th

Re: [PATCH] xhci: handle stop ep on invalid CStream

2018-11-14 Thread Mathias Nyman
Hi On 13.11.2018 08:48, Henry Lin wrote: Below Note in xHCI spec 6.4.2.1 describes a Transfer Event is generated for Stop Endpoint Command on invalid CStream: CStream is not valid until a Streams endpoint transitions to the Start Stream state for the first time. A Transfer Event generated by a

[PATCH 01/14] usb: dwc3: core: Clean up ULPI device

2018-11-14 Thread Felipe Balbi
From: Andy Shevchenko If dwc3_core_init_mode() fails with deferred probe, next probe fails on sysfs with sysfs: cannot create duplicate filename '/devices/pci:00/:00:11.0/dwc3.0.auto/dwc3.0.auto.ulpi' To avoid this failure, clean up ULPI device. Cc: Signed-off-by: Andy Shevchenko Si

[PATCH 03/14] usb: dwc3: gadget: fix ISOC TRB type on unaligned transfers

2018-11-14 Thread Felipe Balbi
When chaining ISOC TRBs together, only the first ISOC TRB should be of type ISOC_FIRST, all others should be of type ISOC. This patch fixes that. Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wMaxPacketSize") Cc: # v4.11+ Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c |

[PATCH 07/14] usb: dwc3: gadget: extract dwc3_gadget_ep_skip_trbs()

2018-11-14 Thread Felipe Balbi
Extract the logic for skipping over TRBs to its own function. This makes the code slightly more readable and makes it easier to move this call to its final resting place as a following patch. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 61 +++

[PATCH 06/14] usb: dwc3: gadget: use num_trbs when skipping TRBs on ->dequeue()

2018-11-14 Thread Felipe Balbi
Now that we track how many TRBs a request uses, it's easier to skip over them in case of a call to usb_ep_dequeue(). Let's do so and simplify the code a bit. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 28 1 file changed, 4 insertions(+), 24 deletions

[PATCH 02/14] usb: dwc3: gadget: Properly check last unaligned/zero chain TRB

2018-11-14 Thread Felipe Balbi
From: Thinh Nguyen Current check for the last extra TRB for zero and unaligned transfers does not account for isoc OUT. The last TRB of the Buffer Descriptor for isoc OUT transfers will be retired with HWO=0. As a result, we won't return early. The req->remaining will be updated to include the BU

[PATCH 04/14] usb: dwc3: gadget: combine unaligned and zero flags

2018-11-14 Thread Felipe Balbi
Both flags are used for the same purpose in dwc3: appending an extra TRB at the end to deal with controller requirements. By combining both flags into one, we make it clear that the situation is the same and that they should be treated equally. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/co

[PATCH 12/14] usb: dwc3: trace: log ep commands in hex

2018-11-14 Thread Felipe Balbi
They are much more useful in hexadecimal than in decimal. Moreover, generic commands are already logged in hex. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h index f

[PATCH 08/14] usb: dwc3: gadget: introduce cancelled_list

2018-11-14 Thread Felipe Balbi
This list will host cancelled requests who still have TRBs being processed. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 2 ++ drivers/usb/dwc3/gadget.c | 1 + drivers/usb/dwc3/gadget.h | 15 +++ 3 files changed, 18 insertions(+) diff --git a/drivers/usb/dwc3/core.h

[PATCH 05/14] usb: dwc3: gadget: track number of TRBs per request

2018-11-14 Thread Felipe Balbi
This will help us remove the wait_event() from our ->dequeue(). Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 3 +++ drivers/usb/dwc3/gadget.c | 6 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index b2ec1a287322..b490d2c49c

[PATCH 11/14] usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc()

2018-11-14 Thread Felipe Balbi
Sometimes, errors happen when kicking transfers from __dwc3_gadget_start_isoc(). In those cases, we need to pass along the error so gadget driver can make informed decisions. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(

[PATCH 13/14] usb: dwc3: gadget: remove unnecessary dev_info()

2018-11-14 Thread Felipe Balbi
Running out of requests on isochronous endpoints is part of normal operation. We don't really need to know about it every time it happens. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/g

[PATCH 14/14] usb: dwc3: gadget: check if dep->frame_number is still valid

2018-11-14 Thread Felipe Balbi
Gadget driver may take an unbounded amount of time to queue requests after XferNotReady. This is important for isochronous endpoints which need to be started for a specific (micro-)frame. If we fail to start a transfer for isochronous endpoint, let's try queueing to a future interval and see if th

[PATCH 09/14] usb: dwc3: gadget: move requests to cancelled_list

2018-11-14 Thread Felipe Balbi
Whenever we have a request in flight, we can move it to the cancelled list and later simply iterate over that list and skip over any TRBs we find. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/driv

[PATCH 10/14] usb: dwc3: gadget: remove wait_end_transfer

2018-11-14 Thread Felipe Balbi
Now that we have a list of cancelled requests, we can skip over TRBs when END_TRANSFER command completes. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 3 --- drivers/usb/dwc3/gadget.c | 40 +-- 2 files changed, 1 insertion(+), 42 deletions(-)

[PATCHv4] usb: gadget: f_fs: Allow scatter-gather buffers

2018-11-14 Thread Andrzej Pietrasiewicz
Some protocols implemented in userspace with FunctionFS might require large buffers, e.g. 64kB or more. Currently the said memory is allocated with kmalloc, which might fail should system memory be highly fragmented. On the other hand, some UDC hardware allows scatter-gather operation and this pat

[PATCH 1/2] Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers"

2018-11-14 Thread Felipe Balbi
From: Shen Jing This reverts commit b4194da3f9087dd38d91b40f9bec42d59ce589a8 since it causes list corruption followed by kernel panic: Workqueue: adb ffs_aio_cancel_worker RIP: 0010:__list_add_valid+0x4d/0x70 Call Trace: insert_work+0x47/0xb0 __queue_work+0xf6/0x400 queue_work_on+0x65/0x70 dwc3_

[PATCH] usb: dwc3: gadget: fix ISOC TRB type on unaligned transfers

2018-11-14 Thread Felipe Balbi
When chaining ISOC TRBs together, only the first ISOC TRB should be of type ISOC_FIRST, all others should be of type ISOC. This patch fixes that. Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wMaxPacketSize") Cc: # v4.11+ Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c |

Re: [PATCH v6 2/3] usb: dwc3: Add disabling of start_transfer failure quirk

2018-11-14 Thread Felipe Balbi
Thinh Nguyen writes: > DWC_usb31 peripheral v1.70a-ea06 and prior needs a SW workaround for > isoc START TRANSFER command failure. However, some affected versions may > have RTL patches to fix this without a SW workaround. Add this quirk to > disable the SW workaround when it is not needed. > > S

[PATCH] usb: dwc3: drd: fix semicolon.cocci warnings

2018-11-14 Thread kbuild test robot
From: kbuild test robot drivers/usb/dwc3/drd.c:491:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 24e2238d8c10 ("usb: dwc3: drd: Register a USB role switch") CC: Heikki Krogerus Signed-off-by: kbuild test robot --- tree: h

[balbi-usb:testing/next 17/22] drivers/usb/dwc3/drd.c:491:2-3: Unneeded semicolon

2018-11-14 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next head: bad6c1502dac79c80ad5a7149fa308849c0191dd commit: 24e2238d8c102f242ece57f45fbeb4014929aad4 [17/22] usb: dwc3: drd: Register a USB role switch coccinelle warnings: (new ones prefixed by >>) >> drivers/usb/

[PATCH v7 0/2] usb: dwc3: Workaround isoc start_transfer failure

2018-11-14 Thread Thinh Nguyen
DWC_usb31 peripheral v1.70a-ea06 and prior needs a SW workaround for isoc START TRANSFER command failure. This patch series implements that workaround Change in v7: - Rebased on Felipe's branch Change in v6: - Defined more version types in "usb: dwc3: Track DWC_usb31 VERSIONTYPE" - Minor cleanu

[PATCH v7 1/2] usb: dwc3: Add disabling of start_transfer failure quirk

2018-11-14 Thread Thinh Nguyen
DWC_usb31 peripheral v1.70a-ea06 and prior needs a SW workaround for isoc START TRANSFER command failure. However, some affected versions may have RTL patches to fix this without a SW workaround. Add this quirk to disable the SW workaround when it is not needed. Synopsys STAR 9001202023: Wrong mic

[PATCH v7 2/2] usb: dwc3: Add workaround for isoc start transfer failure

2018-11-14 Thread Thinh Nguyen
In DWC_usb31 version 1.70a-ea06 and prior, for highspeed and fullspeed isochronous IN, BIT[15:14] of the 16-bit microframe number reported by the XferNotReady event are invalid. The driver uses this number to schedule the isochronous transfer and passes it to the START TRANSFER command. Because thi

Re: [PATCH v6 2/3] usb: dwc3: Add disabling of start_transfer failure quirk

2018-11-14 Thread Thinh Nguyen
Hi, On 11/14/2018 3:41 AM, Felipe Balbi wrote: > Thinh Nguyen writes: > >> DWC_usb31 peripheral v1.70a-ea06 and prior needs a SW workaround for >> isoc START TRANSFER command failure. However, some affected versions may >> have RTL patches to fix this without a SW workaround. Add this quirk to >>

Re: [PATCH 1/2] usb: gadget: Add start_frame to usb_request

2018-11-14 Thread Thinh Nguyen
Hi Felipe, On 11/7/2018 11:03 PM, Felipe Balbi wrote: > Hi, > > Thinh Nguyen writes: >> Similar to URB's start_frame, add a field start_frame to the usb_request >> to report the scheduled (micro)frame number of an isochronous transfer. >> This option is useful for debugging purposes. >> >> Signed

Re: [PATCH 1/2] usb: gadget: Add start_frame to usb_request

2018-11-14 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > Hi Felipe, > > On 11/7/2018 11:03 PM, Felipe Balbi wrote: >> Hi, >> >> Thinh Nguyen writes: >>> Similar to URB's start_frame, add a field start_frame to the usb_request >>> to report the scheduled (micro)frame number of an isochronous transfer. >>> This option is us

[GIT PULL] usb fixes for v4.20-rc2

2018-11-14 Thread Felipe Balbi
Hi Greg, here's the first set of fixes for v4.20-rc cycle. Nothing really major, actually. Let me now if you want anything to be changed Cheers The following changes since commit 651022382c7f8da46cb4872a545ee1da6d097d2a: Linux 4.20-rc1 (2018-11-04 15:37:52 -0800) are available in the Git r

Re: [GIT PULL] usb fixes for v4.20-rc2

2018-11-14 Thread Greg Kroah-Hartman
On Wed, Nov 14, 2018 at 01:33:10PM +0200, Felipe Balbi wrote: > > Hi Greg, > > here's the first set of fixes for v4.20-rc cycle. Nothing really major, > actually. > > Let me now if you want anything to be changed Now pulled, thanks. greg k-h

[balbi-usb:testing/next 17/22] drivers/usb/dwc3/drd.c:604: undefined reference to `usb_role_switch_unregister'

2018-11-14 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next head: bad6c1502dac79c80ad5a7149fa308849c0191dd commit: 24e2238d8c102f242ece57f45fbeb4014929aad4 [17/22] usb: dwc3: drd: Register a USB role switch config: x86_64-randconfig-s4-11151335 (attached as .config) compi

Re: [balbi-usb:testing/next 17/22] drivers/usb/dwc3/drd.c:604: undefined reference to `usb_role_switch_unregister'

2018-11-14 Thread Felipe Balbi
Hi Heikki, kbuild test robot writes: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git > testing/next > head: bad6c1502dac79c80ad5a7149fa308849c0191dd > commit: 24e2238d8c102f242ece57f45fbeb4014929aad4 [17/22] usb: dwc3: drd: > Register a USB role switch > config: x86

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-14 Thread Andy Shevchenko
On Wed, Nov 14, 2018 at 1:53 AM Chanwoo Choi wrote: > I was thinking about again to change from NULL to EPROBE_DEFER. > > extcon_get_extcon_dev() function was almost called in the probe function. > But, this function might be called on other position instead of probe. *Might be* sounds like a th

Re: [PATCH v1 1/5] drivercore: Revert "deferral race condition fix"

2018-11-14 Thread Andy Shevchenko
On Wed, Nov 14, 2018 at 2:34 AM Mark Brown wrote: > > On Mon, Nov 12, 2018 at 06:11:26PM +0200, Peter Ujfalusi wrote: > > > if we revert the commit then the original issue will re-surfaces. afaik > > it was not only audio which hit the 'last driver to be probed from the > > deferred list would nev

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-14 Thread Chanwoo Choi
On 2018년 11월 14일 17:35, Andy Shevchenko wrote: > On Wed, Nov 14, 2018 at 1:53 AM Chanwoo Choi wrote: > >> I was thinking about again to change from NULL to EPROBE_DEFER. >> >> extcon_get_extcon_dev() function was almost called in the probe function. >> But, this function might be called on other

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-14 Thread Andy Shevchenko
On Wed, Nov 14, 2018 at 06:13:37PM +0900, Chanwoo Choi wrote: > On 2018년 11월 14일 17:35, Andy Shevchenko wrote: > > On Wed, Nov 14, 2018 at 1:53 AM Chanwoo Choi wrote: > > > >> I was thinking about again to change from NULL to EPROBE_DEFER. > >> > >> extcon_get_extcon_dev() function was almost cal

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-14 Thread Chanwoo Choi
On 2018년 11월 14일 18:36, Andy Shevchenko wrote: > On Wed, Nov 14, 2018 at 06:13:37PM +0900, Chanwoo Choi wrote: >> On 2018년 11월 14일 17:35, Andy Shevchenko wrote: >>> On Wed, Nov 14, 2018 at 1:53 AM Chanwoo Choi wrote: >>> I was thinking about again to change from NULL to EPROBE_DEFER. >>>

Re: [PATCH v1 1/5] drivercore: Revert "deferral race condition fix"

2018-11-14 Thread Peter Ujfalusi
Andy, On 2018-11-14 10:45, Andy Shevchenko wrote: > On Wed, Nov 14, 2018 at 2:34 AM Mark Brown wrote: >> >> On Mon, Nov 12, 2018 at 06:11:26PM +0200, Peter Ujfalusi wrote: >> >>> if we revert the commit then the original issue will re-surfaces. afaik >>> it was not only audio which hit the 'last

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-14 Thread Andy Shevchenko
On Wed, Nov 14, 2018 at 11:48 AM Chanwoo Choi wrote: > > On 2018년 11월 14일 18:36, Andy Shevchenko wrote: > > On Wed, Nov 14, 2018 at 06:13:37PM +0900, Chanwoo Choi wrote: > >> On 2018년 11월 14일 17:35, Andy Shevchenko wrote: > >>> On Wed, Nov 14, 2018 at 1:53 AM Chanwoo Choi > >>> wrote: > >>> > >>

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-14 Thread Chanwoo Choi
On 2018년 11월 14일 19:20, Andy Shevchenko wrote: > On Wed, Nov 14, 2018 at 11:48 AM Chanwoo Choi wrote: >> >> On 2018년 11월 14일 18:36, Andy Shevchenko wrote: >>> On Wed, Nov 14, 2018 at 06:13:37PM +0900, Chanwoo Choi wrote: On 2018년 11월 14일 17:35, Andy Shevchenko wrote: > On Wed, Nov 14, 201

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-14 Thread Andy Shevchenko
On Wed, Nov 14, 2018 at 1:05 PM Chanwoo Choi wrote: > On 2018년 11월 14일 19:20, Andy Shevchenko wrote: > > On Wed, Nov 14, 2018 at 11:48 AM Chanwoo Choi wrote: > >> On 2018년 11월 14일 18:36, Andy Shevchenko wrote: > >>> On Wed, Nov 14, 2018 at 06:13:37PM +0900, Chanwoo Choi wrote: > On 2018년 11월

[PATCH 4/4] usbnet: smsc95xx: check for csum being in last four bytes

2018-11-14 Thread Ben Dooks
The manual states that the checksum cannot lie in the last DWORD of the transmission, so add a basic check for this and fall back to software checksumming the packet. This only seems to trigger for ACK packets with no options or data to return to the other end, and the use of the tx-alignment opti

SMSC95xx driver updates (round 1)

2018-11-14 Thread Ben Dooks
This is a series of a few driver cleanups and some fixups of the code for the SMSC95XX driver. There have been a few reviews, and the issues have been fixed so this should be ready for merging. I will work on the tx-alignment and the other bits of usbnet changes and produce at least two more patch

[PATCH 2/4] usbnet: smsc95xx: simplify tx_fixup code

2018-11-14 Thread Ben Dooks
The smsc95xx_tx_fixup is doing multiple calls to skb_push() to put an 8-byte command header onto the packet. It would be easier to do one skb_push() and then copy the data in once the push is done. We also make the code smaller by using proper unaligned puts for the header. This merges in the CPU

[PATCH 1/4] usbnet: smsc95xx: fix rx packet alignment

2018-11-14 Thread Ben Dooks
The smsc95xx driver already takes into account the NET_IP_ALIGN parameter when setting up the receive packet data, which means we do not need to worry about aligning the packets in the usbnet driver. Adding the EVENT_NO_IP_ALIGN means that the IPv4 header is now passed to the ip_rcv() routine with

[PATCH 3/4] usbnet: smsc95xx: fix memcpy for accessing rx-data

2018-11-14 Thread Ben Dooks
Change the RX code to use get_unaligned_le32() instead of the combo of memcpy and cpu_to_le32s(&var). Signed-off-by: Ben Dooks --- drivers/net/usb/smsc95xx.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 5

Re: SMSC95xx driver updates (round 1)

2018-11-14 Thread Oliver Neukum
On Mi, 2018-11-14 at 11:50 +, Ben Dooks wrote: > This is a series of a few driver cleanups and some fixups of the code > for the SMSC95XX driver. There have been a few reviews, and the issues > have been fixed so this should be ready for merging. > > I will work on the tx-alignment and the oth

Re: [PATCH V6 01/10] usb: gadget: udc: Add timer for stream capable endpoints

2018-11-14 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: > When bulk streams are enabled for an endpoint, there can > be a condition where the gadget controller waits for the > host to issue prime transaction and the host controller > waits for the gadget to issue ERDY. This condition could > create a deadlock. To avoi

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-14 Thread Andy Shevchenko
On Wed, Nov 14, 2018 at 1:17 PM Andy Shevchenko wrote: > On Wed, Nov 14, 2018 at 1:05 PM Chanwoo Choi wrote: > > > Changing NULL to -ENODEV is a trading bad to worse. > P.S. I still disagree with your arguments in relation to de facto use of an > API. I spoke to colleagues of mine and they ar

RE: scsi_set_medium_removal timeout issue

2018-11-14 Thread Alan Stern
On Wed, 14 Nov 2018, Zengtao (B) wrote: > I just enabled the scsi log in the middle of the umount operation, otherwise > I can't > reproduce the issue when the scsi log is enabled. > > >from the beginning. In any case, it wasn't what I wanted. I asked you to > >post the dmesg log, not the SCSI

Re: [PATCH 4/4] usbnet: smsc95xx: check for csum being in last four bytes

2018-11-14 Thread Sergei Shtylyov
On 11/14/2018 02:50 PM, Ben Dooks wrote: > The manual states that the checksum cannot lie in the last DWORD of the > transmission, so add a basic check for this and fall back to software > checksumming the packet. > > This only seems to trigger for ACK packets with no options or data to > return

Re: [PATCH v2 RESEND] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume

2018-11-14 Thread Todor Tomov
Hello, After I apply this patch on 4.14 (or receive it with 4.14.70) I see a regression with the Qualcomm QUSB2 phy driver. I'm testing on a Dragonboard 820c. In boot log I get: [4.525502] phy phy-7412000.phy.6: QUSB2PHY pll lock failed: status reg = 0 [4.529232] phy phy-7412000.phy.6: p

[PATCH] USB: host: ehci: allow tine of highspeed nak-count

2018-11-14 Thread Ben Dooks
From: Ben Dooks At least some systems benefit with less scheduling if the NAK count value is set higher than the default 4. For instance a Tegra3 with an SMSC9512 showed less interrupt load when this was changed to 14. To allow the changing of this value, add a sysfs node to each of the controll

Re: WARNING in usb_submit_urb (4)

2018-11-14 Thread Andrey Konovalov
On Tue, Nov 13, 2018 at 9:37 PM, Alan Stern wrote: > On Mon, 12 Nov 2018, syzbot wrote: > >> syzbot has found a reproducer for the following crash on: >> >> HEAD commit:e12e00e388de Merge tag 'kbuild-fixes-v4.20' of git://git.k.. >> git tree: upstream >> console output: https://syzkaller

Re: [PATCH] HID: add driver for U2F Zero built-in LED and RNG

2018-11-14 Thread Andrej Shadura
On 12/11/2018 03:17, Jiri Kosina wrote: > On Thu, 1 Nov 2018, Andrej Shadura wrote: > >> Hi everyone, >> >> I’ve got a comment from Nick Kossifidis that I probably shouldn’t set >> RNG’s quality to 1024. Adding linux-crypto@ to the loop. > > So, what was this about? Is there any resolution to it?

Re: [PATCH] USB: host: ehci: allow tine of highspeed nak-count

2018-11-14 Thread Alan Stern
On Wed, 14 Nov 2018, Ben Dooks wrote: > From: Ben Dooks > > At least some systems benefit with less scheduling if the NAK count > value is set higher than the default 4. For instance a Tegra3 with > an SMSC9512 showed less interrupt load when this was changed to 14. Interesting. Why do you thi

Re: [PATCH] HID: add driver for U2F Zero built-in LED and RNG

2018-11-14 Thread Andrej Shadura
On 14/11/2018 10:32, Andrej Shadura wrote: > On 12/11/2018 03:17, Jiri Kosina wrote: >> On Thu, 1 Nov 2018, Andrej Shadura wrote: >> >>> Hi everyone, >>> >>> I’ve got a comment from Nick Kossifidis that I probably shouldn’t set >>> RNG’s quality to 1024. Adding linux-crypto@ to the loop. >> >> So,

Re: [PATCH v2 net-next 06/21] net: usb: aqc111: Introduce link management

2018-11-14 Thread Andrew Lunn
> > Thats again because of this product has tightly integrated MAC+Phy. > > MAC FW controls system interface and reports/alters link state > > as a joint state on copper and SIF (even in dpa direct phy mode). > > > > We can't extract phy api into a standalone fully functional phylib > > therefore

Re: [PATCH v2 net-next 19/21] net: usb: aqc111: Add support for wake on LAN by MAGIC packet

2018-11-14 Thread Andrew Lunn
> We've considered that, but then thought about the following case: > > After such a sleep state where partner's capabilities were considered, > user may move with the unit and replug it into different link partner with > other, incompatible speed mask. That will anyway lead to wol link failure.

[PATCH AUTOSEL 4.18 52/59] net: smsc95xx: Fix MTU range

2018-11-14 Thread Sasha Levin
From: Stefan Wahren [ Upstream commit 85b18b0237ce9986a81a1b9534b5e2ee116f5504 ] The commit f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers") introduce a common MTU handling for usbnet. But it's missing the necessary changes for smsc95xx. So set the MTU range accordingly. Thi

[PATCH AUTOSEL 4.9 04/13] usbnet: smsc95xx: disable carrier check while suspending

2018-11-14 Thread Sasha Levin
From: Frieder Schrempf [ Upstream commit 7b900ead6cc66b2ee873cb042dfba169aa68b56c ] We need to make sure, that the carrier check polling is disabled while suspending. Otherwise we can end up with usbnet_read_cmd() being issued when only usbnet_read_cmd_nopm() is allowed. If this happens, read op

[PATCH AUTOSEL 4.14 26/27] net: smsc95xx: Fix MTU range

2018-11-14 Thread Sasha Levin
From: Stefan Wahren [ Upstream commit 85b18b0237ce9986a81a1b9534b5e2ee116f5504 ] The commit f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers") introduce a common MTU handling for usbnet. But it's missing the necessary changes for smsc95xx. So set the MTU range accordingly. Thi

[PATCH AUTOSEL 4.14 05/27] usbnet: smsc95xx: disable carrier check while suspending

2018-11-14 Thread Sasha Levin
From: Frieder Schrempf [ Upstream commit 7b900ead6cc66b2ee873cb042dfba169aa68b56c ] We need to make sure, that the carrier check polling is disabled while suspending. Otherwise we can end up with usbnet_read_cmd() being issued when only usbnet_read_cmd_nopm() is allowed. If this happens, read op

[PATCH AUTOSEL 4.18 11/59] usbnet: smsc95xx: disable carrier check while suspending

2018-11-14 Thread Sasha Levin
From: Frieder Schrempf [ Upstream commit 7b900ead6cc66b2ee873cb042dfba169aa68b56c ] We need to make sure, that the carrier check polling is disabled while suspending. Otherwise we can end up with usbnet_read_cmd() being issued when only usbnet_read_cmd_nopm() is allowed. If this happens, read op

Re: [PATCH v2 net-next 06/21] net: usb: aqc111: Introduce link management

2018-11-14 Thread Florian Fainelli
On 11/14/18 1:16 PM, Andrew Lunn wrote: >>> Thats again because of this product has tightly integrated MAC+Phy. >>> MAC FW controls system interface and reports/alters link state >>> as a joint state on copper and SIF (even in dpa direct phy mode). >>> >>> We can't extract phy api into a standalone

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-14 Thread Chanwoo Choi
On 2018년 11월 14일 23:04, Andy Shevchenko wrote: > On Wed, Nov 14, 2018 at 1:17 PM Andy Shevchenko > wrote: >> On Wed, Nov 14, 2018 at 1:05 PM Chanwoo Choi wrote: > Changing NULL to -ENODEV is a trading bad to worse. > >> P.S. I still disagree with your arguments in relation to de facto use

[PATCH V1 1/1] USB: serial: f81534: fix reading old/new IC config

2018-11-14 Thread Ji-Ze Hong (Peter Hong)
The F81532/534 had a internal configuration space to save & control IC state with address F81534_CUSTOM_ADDRESS_START (0x2f00). Layout as following: +00h: to indicate the section is valid +01h~04h: UART Mode & port availability +05h~08h: Output pin control on IC power on