Patch fix issue in cdns3_ep0_feature_handle_device function.
The function usleep_range can't be used there because this function is
called with locks held and IRQs disabled in
cdns3_device_thread_irq_handler().
To resolve this issue patch replaces usleep_range with mdelay.
Reported-by: Dan Carpe
On Thu, Sep 26, 2019 at 08:00:30AM +0100, Pawel Laszczak wrote:
> Patch fix issue in cdns3_ep0_feature_handle_device function.
>
> The function usleep_range can't be used there because this function is
> called with locks held and IRQs disabled in
> cdns3_device_thread_irq_handler().
>
> To resol
Hi,
>
>
>On Thu, Sep 26, 2019 at 08:00:30AM +0100, Pawel Laszczak wrote:
>> Patch fix issue in cdns3_ep0_feature_handle_device function.
>>
>> The function usleep_range can't be used there because this function is
>> called with locks held and IRQs disabled in
>> cdns3_device_thread_irq_handler().
Patch fix issue in cdns3_ep0_feature_handle_device function.
The function usleep_range can't be used there because this function is
called with locks held and IRQs disabled in
cdns3_device_thread_irq_handler().
To resolve this issue patch replaces usleep_range with mdelay.
Reported-by: Dan Carpe
On 26.9.2019 8.45, Felipe Balbi wrote:
Hi,
David Laight writes:
From: Mathias Nyman
Sent: 25 September 2019 15:48
On 24.9.2019 17.45, alex zheng wrote:
Hi Mathias,
...
Logs show your transfer ring has four segments, but hardware fails to
jump from the last segment back to first)
Last TR
Drop the redundant lcd mutex introduced by commit 925ce689bb31 ("USB:
autoconvert trivial BKL users to private mutex") which replaced an
earlier BKL use.
The lock serialised calls to open() against other open() and a custom
ioctl() returning the bcdDevice (sic!), but neither is needed.
Signed-off
Replace the one remaining printk with pr_err().
Signed-off-by: Johan Hovold
---
drivers/usb/misc/usblcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
index 732eb1f81368..61e9e987fe4a 100644
--- a/drivers/usb/misc/usblc
This series fixes a failure to stop I/O on disconnect() in the usblcd
driver. Turns out there was a lot of legacy cruft in this driver which
could simply be removed.
The first patch is marked for stable and could go into v5.4 while the
rest is v5.5 material. Posting all at once for completeness.
Drop the redundant lcd mutex introduced by commit 925ce689bb31 ("USB:
autoconvert trivial BKL users to private mutex") which replaced an
earlier BKL use.
The lock serialised calls to open() against other open() and a custom
ioctl() returning the bcdDevice (sic!), but neither is needed.
Signed-off
This series fixes a failure to stop I/O on disconnect() in the usblcd
driver. Turns out there was a lot of legacy cruft in this driver which
could simply be removed.
The first patch is marked for stable and could go into v5.4 while the
rest is v5.5 material. Posting all at once for completeness.
Make sure to stop all I/O on disconnect by adding a disconnected flag
which is used to prevent new I/O from being started and by stopping all
ongoing I/O before returning.
This also fixes a potential use-after-free on driver unbind in case the
driver data is freed before the completion handler has
Drop the redundant disconnect mutex which was introduced after the
open-disconnect race had been addressed generally in USB core by commit
d4ead16f50f9 ("USB: prevent char device open/deregister race").
Specifically, the rw-semaphore in core guarantees that all calls to
open() will have completed
Make sure to stop all I/O on disconnect by adding a disconnected flag
which is used to prevent new I/O from being started and by stopping all
ongoing I/O before returning.
This also fixes a potential use-after-free on driver unbind in case the
driver data is freed before the completion handler has
Drop the redundant disconnect mutex which was introduced after the
open-disconnect race had been addressed generally in USB core by commit
d4ead16f50f9 ("USB: prevent char device open/deregister race").
Specifically, the rw-semaphore in core guarantees that all calls to
open() will have completed
Replace the one remaining printk with pr_err().
Signed-off-by: Johan Hovold
---
drivers/usb/misc/usblcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
index 732eb1f81368..61e9e987fe4a 100644
--- a/drivers/usb/misc/usblc
On Thu, Sep 26, 2019 at 11:12:24AM +0200, Johan Hovold wrote:
> This series fixes a failure to stop I/O on disconnect() in the usblcd
> driver. Turns out there was a lot of legacy cruft in this driver which
> could simply be removed.
My apologies for the double post.
Johan
Adding more simplified API for interface registration and
read and write operations.
The registration is split into separate creation and
registration phases. That allows the drivers to properly
initialize the interface before registering it if necessary.
The read and write operations are supplie
Supplying the operation callbacks as part of a struct
typec_operations instead of as part of struct
typec_capability during port registration.
Signed-off-by: Heikki Krogerus
---
drivers/usb/typec/ucsi/ucsi.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --g
Copying everything from struct typec_capability to struct
typec_port during port registration.
Signed-off-by: Heikki Krogerus
---
drivers/usb/typec/class.c | 55 +--
1 file changed, 35 insertions(+), 20 deletions(-)
diff --git a/drivers/usb/typec/class.c b/dr
Introducing struct typec_operations which has the same
callbacks as struct typec_capability. The old callbacks are
kept for now, but after all users have been converted, they
will be removed.
Signed-off-by: Heikki Krogerus
---
drivers/usb/typec/class.c | 90 +-
Supplying the operation callbacks as part of a struct
typec_operations instead of as part of struct
typec_capability during port registration.
Signed-off-by: Heikki Krogerus
---
drivers/usb/typec/tcpm/tcpm.c | 47 ---
1 file changed, 21 insertions(+), 26 deletions
Supplying the operation callbacks as part of a struct
typec_operations instead of as part of struct
typec_capability during port registration. After this there
is not need to keep the capabilities stored anywhere in the
driver.
Signed-off-by: Heikki Krogerus
---
drivers/usb/typec/tps6598x.c | 49
Leaving the private driver_data pointer of the port device
to the port drivers.
Signed-off-by: Heikki Krogerus
---
drivers/usb/typec/class.c | 11 +++
include/linux/usb/typec.h | 4
2 files changed, 15 insertions(+)
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.
The "run_isr" flag is used for preventing the driver from
calling the interrupt service routine in its runtime resume
callback when the driver is expecting completion to a
command, but what that basically does is that it hides the
real problem. The real problem is that the controller is
allowed to
Hi Ajay,
Here's the pretty much complete rewrite of the I/O handling that I was
talking about. The first seven patches are not actually related to
this stuff, but I'm including them here because the rest of the series
is made on top of them. I'm including also that fix patch I send you
earlier.
A
There are no more users for them.
Signed-off-by: Heikki Krogerus
---
drivers/usb/typec/class.c | 65 +--
include/linux/usb/typec.h | 17 --
2 files changed, 22 insertions(+), 60 deletions(-)
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/c
On 24.9.2019 11.35, Peter Chen wrote:
On some situations, the software handles TRB events slower
than adding TRBs, then xhci_handle_event can't return zero
long time, the xHC will consider the event ring is full,
and trigger "Event Ring Full" error, but in fact, the software
has already finished
Hi,
Mathias Nyman 于2019年9月26日周四 下午4:19写道:
>
> On 26.9.2019 8.45, Felipe Balbi wrote:
> >
> > Hi,
> >
> > David Laight writes:
> >> From: Mathias Nyman
> >>> Sent: 25 September 2019 15:48
> >>>
> >>> On 24.9.2019 17.45, alex zheng wrote:
> Hi Mathias,
> >> ...
> >>> Logs show your transfer r
Replacing the old "cmd" and "sync" callbacks with an
implementation of struct ucsi_operations. The ACPI
notification (interrupt) handler will from now on read the
CCI (Command Status and Connector Change Indication)
register, and call ucsi_connector_change() function and/or
complete pending command
Replacing the old "cmd" and "sync" callbacks with an
implementation of struct ucsi_operations. The interrupt
handler will from now on read the CCI (Command Status and
Connector Change Indication) register, and call
ucsi_connector_change() function and/or complete pending
command completions based o
That data structure was used for constructing the commands
before executing them, but it was never really useful. Using
the structure just complicated the driver. The commands are
64-bit wide, so it is enough to simply fill a u64 variable.
No data structures needed.
This simplifies the driver cons
The drivers now only use the new API, so removing the old one.
Signed-off-by: Heikki Krogerus
---
drivers/usb/typec/ucsi/displayport.c | 8 +-
drivers/usb/typec/ucsi/trace.h | 17 --
drivers/usb/typec/ucsi/ucsi.c| 346 +++
drivers/usb/typec/ucsi/ucsi.h
We can't use bit fields with data that is received or send
to/from the device.
Signed-off-by: Heikki Krogerus
---
drivers/usb/typec/ucsi/trace.h | 12 ++---
drivers/usb/typec/ucsi/ucsi.c | 52 +++
drivers/usb/typec/ucsi/ucsi.h | 93 +-
3 files ch
Hi Heikki,
> -Original Message-
> From: Heikki Krogerus
> Sent: Thursday, September 26, 2019 3:07 AM
> To: Ajay Gupta
> Cc: linux-usb@vger.kernel.org
> Subject: [PATCH 00/14] usb: typec: UCSI driver overhaul
>
> Hi Ajay,
>
> Here's the pretty much complete rewrite of the I/O handling th
34 matches
Mail list logo