Re: [PATCH] n_gsm: Fix write handling for zero bytes written
From: Jiri Slaby <jirislaby@kernel.org>
Date: 2020-08-18 10:14:55
Also in:
lkml
From: Jiri Slaby <jirislaby@kernel.org>
Date: 2020-08-18 10:14:55
Also in:
lkml
On 18. 08. 20, 11:56, Tony Lindgren wrote:
Hi, * Jiri Slaby [off-list ref] [200818 08:24]:quoted
On 17. 08. 20, 15:54, Tony Lindgren wrote:quoted
If write returns zero we currently end up removing the message from the queue. Instead of removing the message, we want to just break out of the loop just like we already do for error codes.When exactly does the only writer (gsmld_output) return zero for non-zero len parameter?I ran into this when testing with the WIP serial core PM runtime changes from Andy Shevchenko earlier. If there are also other cases where we have serial drivers return 0, I don't know about them.
Sorry, I don't understand: my gsmld_output() ignores the return value from drivers' write and returns something greater than zero or a negative error. What tree/SHA do you run?
Basically with the WIP serial core changes, if the open serial port is in PM runtime suspended state with it's autosuspend_delay_ms expired, we have write return 0 and just wake up the serial device on TX.
-- js