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
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
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
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
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_
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
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(
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
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
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
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
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 |
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 +++
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
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
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
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
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
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
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(
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
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
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
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(-)
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
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_
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 |
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
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
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/
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
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
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
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
>>
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
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
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
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
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
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
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
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
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
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
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.
>>>
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
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:
> >>>
> >>
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
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월
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
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
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
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
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
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
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
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
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
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
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
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
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
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?
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
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,
> > 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
> 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.
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
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
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
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
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
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
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
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
75 matches
Mail list logo