On Fri, Apr 29, 2022 at 12:24 PM Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> wrote: > > The driver must provide throttle and unthrottle in uart_ops when it > sets UPSTAT_AUTORTS. Add them using existing stop_rx & > enable_interrupts functions. > > Compile tested (w/o linking). > > Reported-by: Nuno Gonçalves <nunojpg@xxxxxxxxx> > Fixes: 2a76fa283098 (serial: pl011: Adopt generic flag to store auto > RTS status) > Cc: Lukas Wunner <lukas@xxxxxxxxx> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> > > --- > > Maybe this one is the correct solution (I'm not able to test on the real > hw though)? I still get a crash with your patch: [ 827.145500] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 827.154515] Mem abort info: [ 827.157394] ESR = 0x86000005 [ 827.160538] EC = 0x21: IABT (current EL), IL = 32 bits [ 827.165979] SET = 0, FnV = 0 [ 827.169115] EA = 0, S1PTW = 0 [ 827.172332] FSC = 0x05: level 1 translation fault [ 827.177320] user pgtable: 4k pages, 39-bit VAs, pgdp=00000000043f2000 [ 827.183900] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 827.192815] Internal error: Oops: 86000005 [#1] PREEMPT SMP [ 827.198488] CPU: 2 PID: 372 Comm: kworker/u8:0 Tainted: G W 5.18.2 #1 [ 827.206356] Hardware name: Raspberry Pi Compute Module 3 Plus Rev 1.0 (DT) [ 827.213339] Workqueue: events_unbound flush_to_ldisc [ 827.218407] pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 827.225481] pc : 0x0 [ 827.227701] lr : uart_throttle+0x94/0x160 [ 827.231777] sp : ffffffc00804bbd0 [ 827.235137] x29: ffffffc00804bbd0 x28: 0000000000000000 x27: 0000000000000077 [ 827.242398] x26: ffffff8001d74c00 x25: ffffffc0082a1000 x24: 0000000000000000 [ 827.249658] x23: 0000000000000008 x22: ffffff8002a5c058 x21: ffffff8002495080 [ 827.256918] x20: ffffff8001d74c00 x19: 0000000000000024 x18: 0000000000000000 [ 827.264178] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 [ 827.271439] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 [ 827.278696] x11: 000000000000015a x10: 0000000000001a60 x9 : ffffffe59a74aed4 [ 827.285957] x8 : fefefefefefefeff x7 : 0000000000000000 x6 : 0000000000000000 [ 827.293216] x5 : 0000000000000001 x4 : ffffff8002618000 x3 : 000000000000000d [ 827.300474] x2 : 0000000000000004 x1 : 0000000000000000 x0 : ffffff8002495080 [ 827.307732] Call trace: [ 827.310212] 0x0 [ 827.312077] tty_throttle_safe+0xb4/0xe0 [ 827.316067] n_tty_receive_buf_common+0x760/0x1350 [ 827.320937] n_tty_receive_buf2+0x20/0x30 [ 827.325013] tty_ldisc_receive_buf+0x2c/0x80 [ 827.329353] tty_port_default_receive_buf+0x50/0x90 [ 827.334311] flush_to_ldisc+0xfc/0x140 [ 827.338122] process_one_work+0x1dc/0x450 [ 827.342201] worker_thread+0x154/0x450 [ 827.346012] kthread+0x100/0x110 [ 827.349292] ret_from_fork+0x10/0x20 [ 827.352934] Code: bad PC value [ 827.356036] ---[ end trace 0000000000000000 ]--- Thanks, Nuno