All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: n_gsm: delete SABM command frame as requester
@ 2021-07-01  2:54 Zhenguo Zhao
  2021-07-01  6:13 ` Jiri Slaby
  2021-07-01  8:00   ` kernel test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Zhenguo Zhao @ 2021-07-01  2:54 UTC (permalink / raw)
  To: zhenguo6858, gregkh, jirislaby; +Cc: linux-kernel

From: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>

as initiator,it need to send SABM conmmand ,as requester,there is
no need to send the SABM control frame,it will cause redundant data.

Signed-off-by: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
---
 drivers/tty/n_gsm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 5fea02c..e66418b 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -3005,8 +3005,9 @@ static int gsmtty_open(struct tty_struct *tty, struct file *filp)
 	/* We could in theory open and close before we wait - eg if we get
 	   a DM straight back. This is ok as that will have caused a hangup */
 	tty_port_set_initialized(port, 1);
-	/* Start sending off SABM messages */
-	gsm_dlci_begin_open(dlci);
+	/* Start sending off SABM messages for initiator */
+	if (gsm->initiator)
+		gsm_dlci_begin_open(dlci);
 	/* And wait for virtual carrier */
 	return tty_port_block_til_ready(port, tty, filp);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] tty: n_gsm: delete SABM command frame as requester
  2021-07-01  2:54 [PATCH] tty: n_gsm: delete SABM command frame as requester Zhenguo Zhao
@ 2021-07-01  6:13 ` Jiri Slaby
  2021-07-01  6:15   ` Jiri Slaby
  2021-07-01  8:00   ` kernel test robot
  1 sibling, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2021-07-01  6:13 UTC (permalink / raw)
  To: Zhenguo Zhao, gregkh; +Cc: linux-kernel

On 01. 07. 21, 4:54, Zhenguo Zhao wrote:
> From: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
> 
> as initiator,it need to send SABM conmmand ,as requester,there is
> no need to send the SABM control frame,it will cause redundant data.

Hi,

is there any document you can refer to? I am still confused so I don't 
understand why this didn't matter until now. Maybe you only need to 
explain better the whole point behind the introduced initiator/requester 
functionality.

In any way, could you use spell checker on the commit log (like "conmmand")?

> Signed-off-by: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
> ---
>   drivers/tty/n_gsm.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> index 5fea02c..e66418b 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -3005,8 +3005,9 @@ static int gsmtty_open(struct tty_struct *tty, struct file *filp)
>   	/* We could in theory open and close before we wait - eg if we get
>   	   a DM straight back. This is ok as that will have caused a hangup */
>   	tty_port_set_initialized(port, 1);
> -	/* Start sending off SABM messages */
> -	gsm_dlci_begin_open(dlci);
> +	/* Start sending off SABM messages for initiator */
> +	if (gsm->initiator)
> +		gsm_dlci_begin_open(dlci);
>   	/* And wait for virtual carrier */
>   	return tty_port_block_til_ready(port, tty, filp);
>   }
> 

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tty: n_gsm: delete SABM command frame as requester
  2021-07-01  6:13 ` Jiri Slaby
@ 2021-07-01  6:15   ` Jiri Slaby
       [not found]     ` <CAGGV+3+Oc415RJGueGHdYnDGWFqyuD_6ehBWybhR=6bDoFE9Wg@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2021-07-01  6:15 UTC (permalink / raw)
  To: Zhenguo Zhao, gregkh; +Cc: linux-kernel

On 01. 07. 21, 8:13, Jiri Slaby wrote:
> On 01. 07. 21, 4:54, Zhenguo Zhao wrote:
>> From: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
>>
>> as initiator,it need to send SABM conmmand ,as requester,there is
>> no need to send the SABM control frame,it will cause redundant data.
> 
> Hi,
> 
> is there any document you can refer to? I am still confused so I don't 
> understand why this didn't matter until now. Maybe you only need to 
> explain better the whole point behind the introduced initiator/requester 
> functionality.

Having written that, I am missing the WHY part. E.g. why it causes 
redundant data.

> In any way, could you use spell checker on the commit log (like 
> "conmmand")?
> 
>> Signed-off-by: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
>> ---
>>   drivers/tty/n_gsm.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
>> index 5fea02c..e66418b 100644
>> --- a/drivers/tty/n_gsm.c
>> +++ b/drivers/tty/n_gsm.c
>> @@ -3005,8 +3005,9 @@ static int gsmtty_open(struct tty_struct *tty, 
>> struct file *filp)
>>       /* We could in theory open and close before we wait - eg if we get
>>          a DM straight back. This is ok as that will have caused a 
>> hangup */
>>       tty_port_set_initialized(port, 1);
>> -    /* Start sending off SABM messages */
>> -    gsm_dlci_begin_open(dlci);
>> +    /* Start sending off SABM messages for initiator */
>> +    if (gsm->initiator)
>> +        gsm_dlci_begin_open(dlci);
>>       /* And wait for virtual carrier */
>>       return tty_port_block_til_ready(port, tty, filp);
>>   }
>>
> 
> thanks,


-- 
js
suse labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tty: n_gsm: delete SABM command frame as requester
  2021-07-01  2:54 [PATCH] tty: n_gsm: delete SABM command frame as requester Zhenguo Zhao
@ 2021-07-01  8:00   ` kernel test robot
  2021-07-01  8:00   ` kernel test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-07-01  8:00 UTC (permalink / raw)
  To: Zhenguo Zhao, gregkh, jirislaby; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2701 bytes --]

Hi Zhenguo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tty/tty-testing]
[also build test ERROR on v5.13 next-20210630]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zhenguo-Zhao/tty-n_gsm-delete-SABM-command-frame-as-requester/20210701-105612
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: m68k-randconfig-p001-20210630 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/a301defb207dd1f6e0de34d096f55ef6e550073c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhenguo-Zhao/tty-n_gsm-delete-SABM-command-frame-as-requester/20210701-105612
        git checkout a301defb207dd1f6e0de34d096f55ef6e550073c
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/tty/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/tty/n_gsm.c: In function 'gsmtty_open':
>> drivers/tty/n_gsm.c:3012:6: error: 'gsm' undeclared (first use in this function)
    3012 |  if (gsm->initiator)
         |      ^~~
   drivers/tty/n_gsm.c:3012:6: note: each undeclared identifier is reported only once for each function it appears in


vim +/gsm +3012 drivers/tty/n_gsm.c

  2998	
  2999	static int gsmtty_open(struct tty_struct *tty, struct file *filp)
  3000	{
  3001		struct gsm_dlci *dlci = tty->driver_data;
  3002		struct tty_port *port = &dlci->port;
  3003	
  3004		port->count++;
  3005		tty_port_tty_set(port, tty);
  3006	
  3007		dlci->modem_rx = 0;
  3008		/* We could in theory open and close before we wait - eg if we get
  3009		   a DM straight back. This is ok as that will have caused a hangup */
  3010		tty_port_set_initialized(port, 1);
  3011		/* Start sending off SABM messages for initiator */
> 3012		if (gsm->initiator)
  3013			gsm_dlci_begin_open(dlci);
  3014		/* And wait for virtual carrier */
  3015		return tty_port_block_til_ready(port, tty, filp);
  3016	}
  3017	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34644 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tty: n_gsm: delete SABM command frame as requester
@ 2021-07-01  8:00   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-07-01  8:00 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2766 bytes --]

Hi Zhenguo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tty/tty-testing]
[also build test ERROR on v5.13 next-20210630]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zhenguo-Zhao/tty-n_gsm-delete-SABM-command-frame-as-requester/20210701-105612
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: m68k-randconfig-p001-20210630 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/a301defb207dd1f6e0de34d096f55ef6e550073c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhenguo-Zhao/tty-n_gsm-delete-SABM-command-frame-as-requester/20210701-105612
        git checkout a301defb207dd1f6e0de34d096f55ef6e550073c
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/tty/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/tty/n_gsm.c: In function 'gsmtty_open':
>> drivers/tty/n_gsm.c:3012:6: error: 'gsm' undeclared (first use in this function)
    3012 |  if (gsm->initiator)
         |      ^~~
   drivers/tty/n_gsm.c:3012:6: note: each undeclared identifier is reported only once for each function it appears in


vim +/gsm +3012 drivers/tty/n_gsm.c

  2998	
  2999	static int gsmtty_open(struct tty_struct *tty, struct file *filp)
  3000	{
  3001		struct gsm_dlci *dlci = tty->driver_data;
  3002		struct tty_port *port = &dlci->port;
  3003	
  3004		port->count++;
  3005		tty_port_tty_set(port, tty);
  3006	
  3007		dlci->modem_rx = 0;
  3008		/* We could in theory open and close before we wait - eg if we get
  3009		   a DM straight back. This is ok as that will have caused a hangup */
  3010		tty_port_set_initialized(port, 1);
  3011		/* Start sending off SABM messages for initiator */
> 3012		if (gsm->initiator)
  3013			gsm_dlci_begin_open(dlci);
  3014		/* And wait for virtual carrier */
  3015		return tty_port_block_til_ready(port, tty, filp);
  3016	}
  3017	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34644 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tty: n_gsm: delete SABM command frame as requester
       [not found]           ` <CAGGV+3LHqgpuvWC_WpkqYnk=U_1vaCReEMrYkenDSAi95740hQ@mail.gmail.com>
@ 2021-07-07  5:53             ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-07-07  5:53 UTC (permalink / raw)
  To: 赵振国; +Cc: Jiri Slaby, linux-kernel

On Wed, Jul 07, 2021 at 01:31:41PM +0800, 赵振国 wrote:
> Dear Jiri,Greg

<snip>

Please do not send html email, it is rejected by the mailing lists so no
one else can see it to respond.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-07  5:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01  2:54 [PATCH] tty: n_gsm: delete SABM command frame as requester Zhenguo Zhao
2021-07-01  6:13 ` Jiri Slaby
2021-07-01  6:15   ` Jiri Slaby
     [not found]     ` <CAGGV+3+Oc415RJGueGHdYnDGWFqyuD_6ehBWybhR=6bDoFE9Wg@mail.gmail.com>
     [not found]       ` <CAGGV+3J9Kj-GoiCBYNN=JLx=Jj02yMkpdg5E_+3W-tvQ_jESyQ@mail.gmail.com>
     [not found]         ` <CAGGV+3JT6P=tM3_t045FfJtZQ_diPv2_qmnE1LHYvkQo7J7MAw@mail.gmail.com>
     [not found]           ` <CAGGV+3LHqgpuvWC_WpkqYnk=U_1vaCReEMrYkenDSAi95740hQ@mail.gmail.com>
2021-07-07  5:53             ` Greg KH
2021-07-01  8:00 ` kernel test robot
2021-07-01  8:00   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.