Re: [PATCH] serial: core: Fix missing shutdown and startup for serial base port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 11, 2024 at 08:58:45AM +0300, Tony Lindgren wrote:
> We are seeing start_tx being called after port shutdown as noted by Jiri.
> This happens because we are missing the startup and shutdown related
> functions for the serial base port.
> 
> Let's fix the issue by adding startup and shutdown functions for the
> serial base port to block tx flushing for the serial base port when the
> port is not in use.

I tried to test this on the current max3100.c driver, but this doesn't change
anything to me. The scenario is that:

- load the driver with dyndbg on
- attach device (I have done it via SSDT overlay)
- call `stty -F /dev/ttyMAX0` to see it works
- call `stty -F /dev/ttyMAX0 115200` to setup speed
- test case:
  a) run `cat /proc/interrupts > /dev/ttyMAX0`
  b) press Ctrl + C
  c) (most cases) press Ctrl + C
- repeat the previous step several times

The outcome (with or without this change) is that
- it repeatedly calls start_tx()
- most of the times as you may notice it requires actually to press
  Ctrl + C _twice to stop the queueing

The testing environment is the tty-next + this patch.

I admit that max3100 may be buggy, but this change doesn't fix anything for it.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux