Fri, Feb 23, 2024 at 12:29:26AM +0200, andy.shevchenko@xxxxxxxxx kirjoitti: > Thu, Feb 22, 2024 at 10:21:38AM +0100, Federico Vaga kirjoitti: > > On Mon, Jan 22, 2024 at 11:52:15AM +0100, Federico Vaga wrote: ... > > > I'm having problems in trying to use the MOXA CP-132EL card with the 8250 driver > > > on the stable kernel 5.10.192 (but I also tried the 6.1.70). It seems not to > > > work. As a note, to do my tests, I have a loop cable connecting the two on-board > > > serial ports. > > > > > > I see this device should be supported by the 8250 code, in particular this > > > appears in 8250_pci.c > > > > > > ``` > > > $ git grep 132EL drivers/tty/ > > > drivers/tty/serial/8250/8250_pci.c:#define PCI_DEVICE_ID_MOXA_CP132EL 0x1322 > > > drivers/tty/serial/8250/8250_pci.c: { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP132EL), pbn_moxa_2 }, > > > ``` > > > > > > At boot time the device is correctly discovered, and it matches the driver. > > > Indeed two new tty interfaces appear under `/dev` > > > > > > ``` > > > $ dmesg | grep 0d:00.0 > > > [ 0.196175] pci 0000:0d:00.0: [1393:1322] type 00 class 0x070002 > > > [ 0.196350] pci 0000:0d:00.0: reg 0x10: [io 0x4000-0x403f] > > > [ 0.196448] pci 0000:0d:00.0: reg 0x14: [mem 0xb0100000-0xb0100fff] > > > [ 0.196534] pci 0000:0d:00.0: reg 0x18: [io 0x4040-0x404f] > > > [ 0.197474] pci 0000:0d:00.0: supports D1 D2 > > > [ 0.197475] pci 0000:0d:00.0: PME# supported from D3hot > > > [ 0.371301] 0000:0d:00.0: ttyS2 at MMIO 0xb0100000 (irq = 16, base_baud = 921600) is a ST16650 > > > [ 0.371832] 0000:0d:00.0: ttyS3 at MMIO 0xb0100200 (irq = 16, base_baud = 921600) is a ST16650 > > > > > > ``` > > > > > > The communication seems not to work. However, the communication works when using > > > the driver provided by MOXA (``mxupcie.ko``). > > Shouldn't we use mxser in the kernel for MOXA? > > { PCI_DEVICE_DATA(MOXA, CP132, 2) }, Ah, letters matter, we have only these there #define PCI_DEVICE_ID_MOXA_CP132 0x1320 #define PCI_DEVICE_ID_MOXA_CP132U 0x1321 But maybe it should also support 0x1322? Dunno, I believe Jiri knows better. > > > The interesting thing is the following. Binding back the device to the 8250 > > > serial driver after having loaded first the mxupcie makes it work. -- With Best Regards, Andy Shevchenko