> -Original Message-
> From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-
> ow...@vger.kernel.org] On Behalf Of philippedesw...@gmail.com
> Sent: Saturday, May 24, 2014 7:29 PM
> To: philippedesw...@gmail.com; linux-usb@vger.kernel.org
> Subject: [PATCH v3 2/4] libusbg: Fix buffer o
> -Original Message-
> From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-
> ow...@vger.kernel.org] On Behalf Of philippedesw...@gmail.com
> Sent: Saturday, May 24, 2014 7:29 PM
> To: philippedesw...@gmail.com; linux-usb@vger.kernel.org
> Subject: [PATCH v3 1/4] libusbg: Fix readlink/
> -Original Message-
> From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-
> ow...@vger.kernel.org] On Behalf Of philippedesw...@gmail.com
> Sent: Saturday, May 24, 2014 7:29 PM
> To: philippedesw...@gmail.com; linux-usb@vger.kernel.org
> Subject: [PATCH v3 3/4] libusbg: Do not try t
> -Original Message-
> From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-
> ow...@vger.kernel.org] On Behalf Of philippedesw...@gmail.com
> Sent: Saturday, May 24, 2014 7:29 PM
> To: philippedesw...@gmail.com; linux-usb@vger.kernel.org
> Subject: [PATCH v3 4/4] libusbg: Do not deref
On 05/26/2014 08:58 AM, George Cherian wrote:
> On 5/25/2014 2:06 PM, Daniel Mack wrote:
>> The musb/cppi41 glue layer is capable of handling transactions that span
>> over more than one USB packet by reloading the DMA descriptors
>> partially. An urb is considered completed when either its transfe
On 5/23/2014 2:12 AM, Bin Liu wrote:
Hi George,
On Mon, May 19, 2014 at 11:32 PM, George Cherian wrote:
Hi Bin,
On 5/19/2014 9:24 PM, Bin Liu wrote:
Hi,
On Mon, May 19, 2014 at 8:39 AM, George Cherian
wrote:
BABBLE and RESET share the same interrupt. The interrupt
is considered to be RESE
For DSPS platform usb_phy_vbus(_off/_on) are NOPs.
So during musb_platform_reset() call usb_phy(_shutdown/_init)
Signed-off-by: George Cherian
---
drivers/usb/musb/musb_dsps.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb
Currently musb_platform_reset() is only used by dsps.
In case of BABBLE interrupt for other platforms the musb_platform_reset()
is a NOP. In such situations no need to re-initialize the endpoints.
Also in the latest silicon revision of AM335x, we do have a babble recovery
mechanism without resetti
Add sw_babble_control() logic to differentiate between transient
babble and real babble condition. Also add the SW babble control
register definitions.
Babble control register logic is implemented in the latest
revision of AM335x.
Find whether we are running on newer silicon. The babble control
r
Series add support for SW babble control logic found in
new silicon versions of AM335x. Runtime differentiation of
silicon version is done by checking the BABBLE_CTL register.
For newer silicon the register default value read is 0x4 and
for older versions its 0x0.
Patch 1 -> Handle Babble only if
During babble condition both first disconnect of devices are
initiated. Make sure MUSB controller is reset and re-initialized
after all disconnects.
To acheive this schedule a delayed work for babble recovery.
While at that convert udelay to usleep_range.
Refer Documentation/timers/timers-howto.t
BABBLE and RESET share the same interrupt. The interrupt
is considered to be RESET if MUSB is in peripheral mode and
as a BABBLE if MUSB is in HOST mode.
Handle babble condition iff MUSB is in HOST mode.
Signed-off-by: George Cherian
---
drivers/usb/musb/musb_core.c | 2 +-
1 file changed, 1 in
hI,
On Saturday 24 May 2014 03:20 AM, Gregory CLEMENT wrote:
> On 23/05/2014 11:20, Kishon Vijay Abraham I wrote:
>> Hi,
>>
>> On Friday 16 May 2014 09:52 PM, Gregory CLEMENT wrote:
>>> The Armada 375 SoC comes with an USB2 host and device controller and
>>> an USB3 controller. The USB cluster con
We are calling usbnet_start_xmit() to flush any remaining data,
depending on the side effect that tx_curr_skb is set to NULL,
ensuring a new allocation using the updated tx_max. But this
side effect will only happen if there were any cached data ready
to transmit. If not, then an empty tx_curr_skb
Adding documentation for all the driver specific sysfs attributes.
Signed-off-by: Bjørn Mork
---
Documentation/ABI/testing/sysfs-class-net-cdc_ncm | 143 ++
1 file changed, 143 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-net-cdc_ncm
diff --git a/D
Cloning the big skbs we use for USB buffering chokes up TCP and
SCTP because the socket memory limits are hitting earlier than
they should. It is better to unconditionally copy the unwrapped
packets to freshly allocated skbs.
Reported-by: Jim Baxter
Acked-by: Eric Dumazet
Signed-off-by: Bjørn Mo
The ethtool coalesce API is not applicable for this driver. Forcing
it to fit the NCM aggregation redefined the API in a driver specific
way, which is much worse than defining a clean new API. These ethtool
coalesce functions have therefore been replaced by a new sysfs API.
Signed-off-by: Bjørn Mo
Attach a driver specific sysfs group to the netdev, and use it
for the rx/tx aggregation variables.
The datagram aggregation defined by the CDC NCM specification is
specific to this device class (including CDC MBIM). Using the
ethtool interrupt coalesce API as an interface to the aggregation
param
After considering the comments received after the ethtool coalesce
support was commited, I have ended up concluding that we should
remove it again, while we can, before it hits a release. The idea
was not well enough thought through, and all comments received
pointed to advantages of using a sysfs
It doesn't matter whether the buffer size goes up or down. We have to
keep usbnet and device syncronized to be able to split transfers at the
correct boundaries. The spec allow skipping short packets when using
max sized transfers. If we don't tell usbnet about our new expected rx
buffer size, th
The min_tx_pkt variable decides the cutoff point where the driver
will stop padding out NTBs to maximum size. The padding is a tradeoff
where we use some USB bus bandwidth to allow the device to receive
fixed size buffers. Different devices will have different optimal
settings, spanning from no pad
The mandatory GetNtbParameters control request is an important part of
the host <-> device protocol negotiation in CDC NCM (and CDC MBIM). It
gives device limits which the host must obey when configuring the
protocol aggregation variables. The driver will enforce this by
rejecting attempts to set a
Thank your for your reply,
A summary of my Bugreport at Launchpad:
My usb-Webcam Logitech c920 doesn't work when connected to my usb 3.0
Host Controller (Etron EJ168a). When connected to a usb 2.0 Host
Controller it works perfectly. When I connect my usb 3.0 stick to the
same port, it's recogn
Hi Jean,
Thank you for the patch.
On Friday 23 May 2014 10:36:22 Jean Delvare wrote:
> The Renesas R-Car USB PHY driver only supports the R8A7778 and
> R8A7779, it isn't useful on other systems unless build testing.
>
> Signed-off-by: Jean Delvare
> Cc: Felipe Balbi
> Cc: Greg Kroah-Hartman
>
Here is v4 of my cleanup series for musb in CPPI DMA mode.
v3 -> v4:
* s/MUSB_CSR0_TXPKTRDY/MUSB_TXCSR_TXPKTRDY/ in patch #4
* s/packet_done/rx_packet_done/ in #5
v2 -> v3:
* Dropped the RXSTALL bit modification from patch #4
* Droped some occasions where musb_ep_s
Just a little cleanup that removes unnecessary casts.
Signed-off-by: Daniel Mack
Acked-by: George Cherian
---
drivers/usb/musb/musb_host.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index eb06291..f98a7c0
On AM33xx platforms, unplugging a device in the middle of an active
transfer leads to a drop of MUSB_DEVCTL_HM in MUSB_DEVCTL before the
system is informed about a disconnect. This consequently makes the musb
core call the gadget code to handle the interrupt request, which then
crashes the kernel b
When a 0-length packet is received on the bus, desc->pd0 yields 1,
which confuses the driver's users. This information is clearly wrong
and not in accordance to the datasheet, but it's been observed on an
AM335x board, very reproducible.
Fix this by looking at bit 19 in PD2 of the completed packet
Just a cosmetic cleanup with no functional change.
Signed-off-by: Daniel Mack
---
drivers/usb/musb/musb_host.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index b00edd2..ac6dd92 100644
--- a/drivers/us
The musb/cppi41 glue layer is capable of handling transactions that span
over more than one USB packet by reloading the DMA descriptors
partially. An urb is considered completed when either its transfer
buffer has been filled entirely (actual_length ==
transfer_buffer_length) or if a packet in the
Before accessing any of an endpoint's CSR registers, make sure the
correct endpoint is selected. Otherwise, data read from or written to
the registers is likely to affect the wrong endpoint as long as the
connected device has more than one endpoint.
This, of course, leads to all sorts of strange e
The datasheet says that MUSB_TXCSR_FLUSHFIFO is only valid when
MUSB_TXCSR_TXPKTRDY is set as well.
With this patch applied, the warning in this function does no longer
kick in when an USB soundcard is unplugged while the stream is active.
Signed-off-by: Daniel Mack
---
drivers/usb/musb/musb_ho
Hello.
On 05/26/2014 04:50 PM, Laurent Pinchart wrote:
The Renesas R-Car USB PHY driver only supports the R8A7778 and
R8A7779, it isn't useful on other systems unless build testing.
Signed-off-by: Jean Delvare
Cc: Felipe Balbi
Cc: Greg Kroah-Hartman
Cc: Laurent Pinchart
Could you plea
Hello.
On 05/24/2014 11:22 AM, Daniel Mack wrote:
I I'd say it's not supposed to. I just wanted the bit to be 0 when
writing back the CSR.
You failed to achieve that since you forgot ~; you're clearing all bits but
this one.
Ouch, totally missed that, thanks!
And I've missed CSR0
On 05/22/2014 05:10 PM, Alan Stern wrote:
> On Thu, 22 May 2014, Heinz Diehl wrote:
>
>> On 21.05.2014, Alan Stern wrote:
>>
>>> In that case, I have no idea what else could be causing the problem.
>>
>> Thanks for your efforts!
>>
>> If somebody of the developers is interested in debugging t
On 05/22/2014 05:22 PM, David Laight wrote:
> From: Alan Stern
>> On Thu, 22 May 2014, Heinz Diehl wrote:
>>
>>> On 21.05.2014, Alan Stern wrote:
>>>
In that case, I have no idea what else could be causing the problem.
>>>
>>> Thanks for your efforts!
>>>
>>> If somebody of the developers
This issue was reported by coccicheck using the semantic patch
at scripts/coccinelle/api/memdup.cocci
Signed-off-by: Benoit Taine
---
Tested by compilation without errors.
drivers/usb/storage/ene_ub6250.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/stor
This issue was reported by coccicheck using the semantic patch
at scripts/coccinelle/api/memdup.cocci
Signed-off-by: Benoit Taine
---
Tested by compilation without errors.
drivers/usb/gadget/configfs.c|4 +---
drivers/usb/gadget/lpc32xx_udc.c |3 +--
2 files changed, 2 insertions(+
These patches enhance kernel style usage, and allows smaller code while
preventing accidental code edits to produce overflows.
The semantic patch at scripts/coccinelle/api/memdup.cocci was used to
detect and edit this situation.
--
To unsubscribe from this list: send the line "unsubscribe linux-us
This issue was reported by coccicheck using the semantic patch
at scripts/coccinelle/api/memdup.cocci
Signed-off-by: Benoit Taine
---
Tested by compilation without errors.
drivers/net/usb/r8152.c |4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/usb/r8152.c
On 26.05.2014, Mathias Nyman wrote:
> This would be helpful, I've got a LeCroy protocol analyzer in Finland.
> Heinz, if you're willing to send it to Europe Finland I'll gladly take it,
> (I'll send the address details in a separate personal mail)
Of course! Send me your adress, and I'll send
Fix use after free or NULL-pointer dereference during suspend and
resume.
The port data may never have been allocated (port probe failed)
or may already have been released by port_remove (e.g. driver is
unloaded) when suspend and resume are called.
Fixes: e6929a9020ac ("USB: support for autosuspe
Make sure to kill any already submitted read urbs on read-urb submission
failures in open in order to prevent doing I/O for a closed port.
Fixes: 088c64f81284 ("USB: cdc-acm: re-write read processing")
Signed-off-by: Johan Hovold
---
drivers/usb/class/cdc-acm.c | 3 +++
1 file changed, 3 inserti
The delayed-write queue was never emptied on disconnect, something which
would lead to leaked urbs and transfer buffers if the device is
disconnected before being runtime resumed due to a write.
Fixes: e6929a9020ac ("USB: support for autosuspend in sierra while
online")
Cc: # v2.6.32
Signed-o
Fix potential I/O while runtime suspended due to missing PM operations
in send_setup.
Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the
option driver")
Cc: # v2.6.32
Signed-off-by: Johan Hovold
---
drivers/usb/serial/option.c | 11 ++-
1 file changed, 10 insert
Remove redundant disconnect test from shutdown(), which is never called
post disconnect() where we do synchronous hangup.
Signed-off-by: Johan Hovold
---
drivers/usb/class/cdc-acm.c | 41 +++--
1 file changed, 19 insertions(+), 22 deletions(-)
diff --git a/dr
There's no need to call usb_mark_last_busy after having increased the PM
counter in write(). The device will be marked busy by USB core when the
PM counter is balanced in the completion handler.
Signed-off-by: Johan Hovold
---
drivers/usb/class/cdc-acm.c | 1 -
1 file changed, 1 deletion(-)
dif
As the port interrupt URB is submitted by the subdriver at open, we
should also kill it explicitly at suspend (even though this will be
taken care of by USB serial core otherwise).
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb_wwan.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletio
Fix incorrect pipe directions in control requests (which has been
silently fixed up by USB core).
Signed-off-by: Johan Hovold
---
drivers/usb/wusbcore/wa-rpipe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/wusbcore/wa-rpipe.c b/drivers/usb/wusbcore/wa-rpip
Remove redundant usb_kill_urb from port remove, which is called
post-shutdown (close).
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb_wwan.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index aa45985
We can simply the runtime PM locking as there's no need to check the
susp_count in the read path (at least not since killing the rx tasklet).
Specifically, the read urbs will never be resubmitted by the completion
handler when killed during suspend.
Signed-off-by: Johan Hovold
---
drivers/usb/c
Now that acm_set_control() handles runtime PM properly, the only
remaining reason for the PM operations in shutdown is to clear the
needs_remote_wakeup flag before the final put.
Note that this also means that we now need to grab the write_lock to
prevent racing with resume.
Signed-off-by: Johan
The interrupt urb was submitted unconditionally at resume, something
which could lead to a NULL-pointer dereference in the urb completion
handler as resume may be called after the port and port data is gone.
Fix this by making sure the interrupt urb is only submitted and active
when the port is op
Make resume error messages uniform.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb_wwan.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index b671d59e356e..3737006930c0 100644
--- a/drivers/usb/seria
The usb_wwan_send_setup() function has never existed.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb-wwan.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/serial/usb-wwan.h b/drivers/usb/serial/usb-wwan.h
index dc379603c4b8..8502f9add334 100644
--- a/drivers/usb/serial/us
Fix runtime PM handling of control messages by adding the required PM
counter operations.
Fixes: 11ea859d64b6 ("USB: additional power savings for cdc-acm devices
that support remote wakeup")
Cc: # v2.6.27
Signed-off-by: Johan Hovold
---
drivers/usb/class/cdc-acm.c | 12 +++-
1 file
Use usb_get_serial_data() rather than accessing the private pointer
directly.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb_wwan.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
ind
The current ACM runtime-suspend implementation is broken in several
ways:
Firstly, it buffers only the first write request being made while
suspended -- any further writes are silently dropped.
Secondly, writes being dropped also leak write urbs, which are never
reclaimed (until the device is unb
Remove no longer needed disconnected test from close, which is never
called post disconnect (and drivers must handle failed I/O during
disconnect anyway).
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git
We should stop I/O unconditionally at suspend rather than rely on the
tty-port initialised flag (which is set prior to stopping I/O during
shutdown) in order to prevent suspend returning with URBs still active.
Fixes: 11ea859d64b6 ("USB: additional power savings for cdc-acm devices
that support re
The driver does not implement set_termios so the operation can be left
unset (tty will do the tty_termios_copy_hw for us).
Note that the send_setup call is bogus as it really only sets DTR/RTS
to their current values.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/option.c | 1 -
drivers
There's no need to update the runtime PM last_busy field on read urb
errors (e.g. when the urb is being killed on shutdown).
Signed-off-by: Johan Hovold
---
drivers/usb/class/cdc-acm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/us
Promote failed-submission messages in open() and write() to error log
level.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb_wwan.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index c951f75
We must not do the usb_autopm_put_interface() before submitting the read
urbs or we might end up doing I/O to a suspended device.
Fixes: 088c64f81284 ("USB: cdc-acm: re-write read processing")
Signed-off-by: Johan Hovold
---
drivers/usb/class/cdc-acm.c | 7 +++
1 file changed, 3 insertions(+
Fix race between write() and suspend() which could lead to writes being
dropped (or I/O while suspended) if the device is runtime suspended
while a write request is being processed.
Specifically, suspend() releases the write_lock after determining the
device is idle but before incrementing the sus
Clean up and rename delay-urb submission function using a more
descriptive name.
Also add comment on locking assumptions.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb_wwan.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/serial/usb_wwan.
Remove bogus endpoint-address test which is never true.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 4cb11b710b48..169899f5f2e6 100644
--- a/drivers/usb/serial/sie
Move usb_autopm_get_interface_no_resume to the end of close(). This
makes the window during which suspend is prevented before the final put
in USB serial core slightly smaller.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: xiao jin
When enable usb serial for modem data, sometimes the tty is blocked
in tty_wait_until_sent because portdata->out_busy always is set and
have no chance to be cleared.
We find a bug in write error path. usb_wwan_write set portdata->out_busy
firstly, then try autopm async with error.
Remove unused variable from sierra_release_urb.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 169899f5f2e6..fa0b78ad42d7 100644
--- a/drivers/usb/serial/sierra.c
+++
Use tty-port initialised flag rather than private flag to determine when
port is closing down.
Since the tty-port flag is set prior to dropping DTR/RTS (when HUPCL is
set) this avoid submitting the read urbs when resuming the interface in
dtr_rts() only to immediately kill them again in shutdown()
The driver does not implement set_termios so the operation can be left
unset (tty will do the tty_termios_copy_hw for us).
Note that the send_setup call is bogus as it really only sets DTR/RTS
to their current values.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 8
1 f
Make sure to stop all I/O, including any active write urbs, at shutdown.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index ed43b18ace78..96ad379a0681 100644
--- a/drive
Use tty-port initialised flag rather than private flag to determine when
port is closing down.
Since the tty-port flag is set prior to dropping DTR/RTS (when HUPCL is
set) this avoid submitting the read urbs when resuming the interface in
dtr_rts() only to immediately kill them again in shutdown()
Refactor and clean up delayed-urb submission at resume.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 63 +++--
1 file changed, 43 insertions(+), 20 deletions(-)
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index
Add error message to resume error path and make sure to also return an
error when failing to submit a cached write.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index
The only way a port pointer may be NULL is if probe() failed, and in
that case neither disconnect(), resume(), or reset_resume() will be
called.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb-serial.c | 38 ++
1 file changed, 14 insertions(+), 24 delet
Fix AA deadlock in open error path that would call close() and try to
grab the already held disc_mutex.
Fixes: b9a44bc19f48 ("sierra: driver urb handling improvements")
Cc: # v2.6.31
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 21 +
1 file changed, 13 i
Make sure that needs_remote_wake up is always set when there are open
ports.
Currently close() would unconditionally set needs_remote_wakeup to 0
even though there might still be open ports. This could lead to blocked
input and possibly dropped data on devices that do not support remote
wakeup (an
Do not resume any I/O, including the delayed write queue, on closed
ports.
Note that this currently has no functional impact due to the
usb_autopm_get_interface() in close(), but that call is about to be
removed by a follow-up patch.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c |
The sierra line-control request has been using the wrong pipe direction,
while relying on USB core to fix it up.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra
Turns out that the three current implementations of aggressive runtime
power management in USB-TTY drivers were quite badly broken (and has so
been since first merged in v2.6.27 and v2.6.32).
These patches fix this runtime PM mess, but also do some clean up and
fix a few other issues.
Note that a
Make sure that needs_remote_wake up is always set when there are open
ports.
Currently close() would unconditionally set needs_remote_wakeup to 0
even though there might still be open ports. This could lead to blocked
input and possibly dropped data on devices that do not support remote
wakeup (an
Remove superfluous and cryptic comment from close.
It should be obvious that we're balancing the autopm_put in open (and
that operation already mentions the autopm_get done in the USB serial
core).
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb_wwan.c | 1 -
1 file changed, 1 deletion(-
Fix characters potentially being dropped at close due to missing
chars_in_buffer implementation.
Note that currently the write urbs are not even killed at close (will be
fixed separately), but this could still lead to dropped data since we
have lowered DTR/RTS.
Signed-off-by: Johan Hovold
---
d
Neither the transfer buffer or the urb itself were released in the
resume error path for delayed writes. Also on errors, the remainder of
the queue was not even processed, which leads to further urb and buffer
leaks.
The same error path also failed to balance the outstanding-urb counter,
something
Make sure only to decrement the PM counters if they were actually
incremented.
Note that the USB PM counter, but not necessarily the driver core PM
counter, is reset when the interface is unbound.
Fixes: 11ea859d64b6 ("USB: additional power savings for cdc-acm devices
that support remote wakeup")
There's no reason not to try sending off any further delayed write urbs,
should one urb-submission fail.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb_wwan.c | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/serial/usb_wwan.c b
Only call usb_autopm_put_interface() if the corresponding
usb_autopm_get_interface() was successful.
This prevents a potential runtime PM counter imbalance should
usb_autopm_get_interface() fail. Note that the USB PM usage counter is
reset when the interface is unbound, but that the runtime PM cou
Remove some more outdated or superfluous comments.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/usb_wwan.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index 5042faa5d588..c951f75891c9 100644
--- a/drivers/usb/seria
Fix incorrect pipe directions and remove bogus data buffer arguments
from control requests without data stage.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/kobil_sct.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/serial/kobil_sct.
We should call usb_mark_last_busy in all input paths, including the
interrupt completion handler.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/option.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 2003a66c4807..df91ea92
The delayed-write queue was never emptied at shutdown (close), something
which could lead to leaked urbs if the port is closed before being
runtime resumed due to a write.
When this happens the output buffer would not drain on close
(closing_wait timeout), and after consecutive opens, writes could
Add dtr_rts tty-port operation which implements proper DTR/RTS handling
(e.g. only lower DTR/RTS during shutdown if HUPCL is set).
Note that modem-control locking still needs to be added throughout the
driver.
Signed-off-by: Johan Hovold
---
drivers/usb/class/cdc-acm.c | 32
Fix race between write() and resume() due to improper locking that could
lead to writes being reordered.
Resume must be done atomically and susp_count be protected by the
write_lock in order to prevent racing with write(). This could otherwise
lead to writes being reordered if write() grabs the wr
From: xiao jin
We find a race between write and resume. usb_wwan_resume run play_delayed()
and spin_unlock, but intfdata->suspended still is not set to zero.
At this time usb_wwan_write is called and anchor the urb to delay
list. Then resume keep running but the delayed urb have no chance
to be c
Use usb_get_serial_data() rather than accessing the private pointer
directly.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 3a2f5b80d875.
Fix race between write() and suspend() which could lead to writes being
dropped (or I/O while suspended) if the device is runtime suspended
while a write request is being processed.
Specifically, suspend() releases the susp_lock after determining the
device is idle but before setting the suspended
Keep trying to submit urbs rather than bail out on first read-urb
submission error, which would also prevent I/O for any further ports
from being resumed.
Instead keep an error count, for all types of failed submissions, and
let USB core know that something went wrong.
Also make sure to always cl
Clean up suspend() somewhat and make sure to always set the suspended
flag (although it's only used for runtime PM) in order to match
resume().
Signed-off-by: Johan Hovold
---
drivers/usb/serial/sierra.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/driver
1 - 100 of 110 matches
Mail list logo