LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] tty: n_gsm: delete CLD command frame as requester
@ 2021-07-01 5:58 Zhenguo Zhao
2021-07-21 10:24 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Zhenguo Zhao @ 2021-07-01 5:58 UTC (permalink / raw)
To: zhenguo6858, gregkh, jirislaby; +Cc: linux-kernel
From: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
as initiator,it may be send CLD conmmand ,as requester,there is
no need to send the CLD control frame,it will cause redundant data.
Signed-off-by: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
---
drivers/tty/n_gsm.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 5fea02c..eecbc76 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -2043,9 +2043,11 @@ static int gsm_disconnect(struct gsm_mux *gsm)
/* In theory disconnecting DLCI 0 is sufficient but for some
modems this is apparently not the case. */
- gc = gsm_control_send(gsm, CMD_CLD, NULL, 0);
- if (gc)
- gsm_control_wait(gsm, gc);
+ if (gsm->initiator) {
+ gc = gsm_control_send(gsm, CMD_CLD, NULL, 0);
+ if (gc)
+ gsm_control_wait(gsm, gc);
+ }
del_timer_sync(&gsm->t2_timer);
/* Now we are sure T2 has stopped */
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tty: n_gsm: delete CLD command frame as requester
2021-07-01 5:58 [PATCH] tty: n_gsm: delete CLD command frame as requester Zhenguo Zhao
@ 2021-07-21 10:24 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-07-21 10:24 UTC (permalink / raw)
To: Zhenguo Zhao; +Cc: jirislaby, linux-kernel
On Thu, Jul 01, 2021 at 01:58:05PM +0800, Zhenguo Zhao wrote:
> From: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
>
> as initiator,it may be send CLD conmmand ,as requester,there is
> no need to send the CLD control frame,it will cause redundant data.
Same issue here.
And please make this a patch series, properly numbered, so we can track
them all together.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-21 10:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 5:58 [PATCH] tty: n_gsm: delete CLD command frame as requester Zhenguo Zhao
2021-07-21 10:24 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).