Page MenuHomeVyOS Platform

Moschip MCS9900 fix driver
Closed, WontfixPublicBUG

Description

Good afternoon
Faced the problem of this device - Moschip MCS9900.
The system sees only 4 ports out of 8. This is due to the work of the driver.
I will attach the readme file from the driver. I'll show you what's written there.

https://www.asix.com.tw/en/product/Interface/PCIe_Bridge/MCS9900
1.In the 99xx.c file, variable "mode" indicates the slave chip serial ports enable or not.

		Choose "CASCADE_MODE" to enable slave chip serial ports.
		Choose "NORMAL_MODE" to disable slave chip serial ports.

Details

Difficulty level
Unknown (require assessment)
Version
rolling
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

https://cateee.net/lkddb/web-lkddb/PARPORT_PC.html

I found your devices supported but I need build and check again.

vyos@vyos:~$ show version 
Version:          VyOS 1.4-rolling-202306270317
Release train:    current

Built by:         [email protected]
Built on:         Tue 27 Jun 2023 03:17 UTC
Build UUID:       488def54-7e73-4cda-adf2-396b7fe73c29
Build commit ID:  35dec9e1bc7240

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Gigabyte Technology Co., Ltd.
Hardware model:   EP43T-S3L
Hardware S/N:     
Hardware UUID:    00000000-0000-0000-0000-1c6f652b9d57

Copyright:        VyOS maintainers and contributors

Same in https://forum.vyos.io/t/need-some-help-troubleshooting-nic-detection/11291/15

Try edit kernel config and build 1.4 rolling and test it.

CONFIG_PARPORT=y
CONFIG_PARPORT_PC=m

Thank you very much, I compiled the image, now it remains only to check.
As soon as I check, I will write.

Good afternoon
Unfortunately it didn't help.

root@scripts:~/vyos-build# cat ./packages/linux-kernel/arch/x86/configs/vyos_defconfig | grep PARPORT
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
# CONFIG_PARPORT is not set
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=m
vyos@vyos# set service console-server device 
Possible completions:
 > ttySxxx              Regular serial interface
 > usbxbxpx             USB based serial interface
 > ttyS0                
 > ttyS1                
 > ttyS2                
 > ttyS3

I tested CONFIG_PARPORT_SERIAL=m, same result.

CONFIG_PARPORT=y
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
02:00.0 Communication controller: MosChip Semiconductor Technology Ltd. MCS9900 Multi-I/O Controller
	Subsystem: Asix Electronics Corporation (Wrong ID) MCS9900 Multi-I/O Controller
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 4 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: I/O ports at df00 [size=8]
	Region 1: Memory at fdcff000 (32-bit, non-prefetchable) [size=4K]
	Region 3: I/O ports at de00 [size=8]
	Region 4: Memory at fdcfe000 (32-bit, non-prefetchable) [size=4K]
	Region 5: Memory at fdcfd000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: serial

02:00.1 Communication controller: MosChip Semiconductor Technology Ltd. MCS9900 Multi-I/O Controller
	Subsystem: Asix Electronics Corporation (Wrong ID) MCS9900 Multi-I/O Controller
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 4 bytes
	Interrupt: pin B routed to IRQ 17
	Region 0: I/O ports at dd00 [size=8]
	Region 1: Memory at fdcfc000 (32-bit, non-prefetchable) [size=4K]
	Region 3: I/O ports at dc00 [size=8]
	Region 4: Memory at fdcfb000 (32-bit, non-prefetchable) [size=4K]
	Region 5: Memory at fdcfa000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: serial

02:00.2 Communication controller: MosChip Semiconductor Technology Ltd. MCS9900 Multi-I/O Controller
	Subsystem: Asix Electronics Corporation (Wrong ID) MCS9900 Multi-I/O Controller
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 4 bytes
	Interrupt: pin C routed to IRQ 18
	Region 0: I/O ports at db00 [size=8]
	Region 1: Memory at fdcf9000 (32-bit, non-prefetchable) [size=4K]
	Region 3: I/O ports at da00 [size=8]
	Region 4: Memory at fdcf8000 (32-bit, non-prefetchable) [size=4K]
	Region 5: Memory at fdcf7000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: serial

02:00.3 Communication controller: MosChip Semiconductor Technology Ltd. MCS9900 Multi-I/O Controller
	Subsystem: Asix Electronics Corporation (Wrong ID) MCS9900 Multi-I/O Controller
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 4 bytes
	Interrupt: pin D routed to IRQ 19
	Region 0: I/O ports at d900 [size=8]
	Region 1: Memory at fdcf6000 (32-bit, non-prefetchable) [size=4K]
	Region 3: I/O ports at d800 [size=8]
	Region 4: Memory at fdcf5000 (32-bit, non-prefetchable) [size=4K]
	Region 5: Memory at fdcf4000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: serial
Jul 03 04:40:13 kernel: Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
Jul 03 04:40:13 kernel: 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
Jul 03 04:40:13 kernel: 0000:02:00.0: ttyS1 at I/O 0xdf00 (irq = 16, base_baud = 115200) is a 16550A
Jul 03 04:40:13 kernel: 0000:02:00.0: ttyS2 at I/O 0xde00 (irq = 16, base_baud = 115200) is a 16550A
Jul 03 04:40:13 kernel: 0000:02:00.1: ttyS3 at I/O 0xdd00 (irq = 17, base_baud = 115200) is a 16550A
Jul 03 04:40:13 kernel: serial 0000:02:00.1: Couldn't register serial port dc00, irq 17, type 0, error -28
Jul 03 04:40:13 kernel: serial 0000:02:00.2: Couldn't register serial port db00, irq 18, type 0, error -28
Jul 03 04:40:13 kernel: serial 0000:02:00.3: Couldn't register serial port d900, irq 19, type 0, error -28

@cuongdt1994 I did not build the kernel, I built the image and specified the modules in the file. Which you were talking about earlier.

изображение.png (178×1 px, 21 KB)

@cuongdt1994 I did not build the kernel, I built the image and specified the modules in the file. Which you were talking about earlier.

изображение.png (178×1 px, 21 KB)

Wrong, you need build the kernel. If don't build the kernel. It's never work.

@cuongdt1994
The kernel has assembled, as a result, the image now cannot be assembled
vyos-build/data/defaults.json change version 6.4.0

P: Executing hook config/hooks/live/17-gen_initramfs.chroot...
I: Create initramfs if it does not exist.
E: there is more than one kernel image file installed!
E: please make sure that kernel_version in data/defaults.toml is up to date
E: if your repository is up to date, then there is a bug
I: Executing update-initramfs -c -k 6.1.37-amd64-vyos
6.4.0-amd64-vyos
Extra argument '6.4.0-amd64-vyos'


Usage: update-initramfs {-c|-d|-u} [-k version] [-v] [-b directory]

Options:
 -k version     Specify kernel version or 'all'
 -c             Create a new initramfs
 -u             Update an existing initramfs
 -d             Remove an existing initramfs
 -b directory   Set alternate boot directory
 -v             Be verbose

See update-initramfs(8) for further details.

E: config/hooks/live/17-gen_initramfs.chroot failed (exit non-zero). You should check for errors.
E: An unexpected failure occurred, exiting...
P: Begin unmounting filesystems...
P: Saving caches...

@aztec102

Try and report, it's included in kernel:
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m

https://drive.google.com/file/d/1n7VFjxgULsULypC1TC95XOK0bELag1lV/view?usp=sharing

@cuongdt1994 Thanks a lot, I'll definitely check it out.

vyos@vyos:~$ show version 
Version:          VyOS 1.4-rolling-202307051212
Release train:    current

Built by:         [email protected]
Built on:         Wed 05 Jul 2023 12:12 UTC
Build UUID:       231d2a68-4c9e-4c9d-bca4-9502cc7d474a
Build commit ID:  934bccc686d764-dirty

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Gigabyte Technology Co., Ltd.
Hardware model:   EP43T-S3L
Hardware S/N:     
Hardware UUID:    00000000-0000-0000-0000-1c6f652b9d57

Copyright:        VyOS maintainers and contributors
vyos@vyos:~$ ls /dev/ | grep ttyS
ttyS0
ttyS1
ttyS2
ttyS3
vyos@vyos:~$ lsmod | grep par
vyos@vyos# set service console-server device 
Possible completions:
 > ttySxxx              Regular serial interface
 > usbxbxpx             USB based serial interface
 > ttyS0                
 > ttyS1                
 > ttyS2                
 > ttyS3

@cuongdt1994 Unfortunately it didn't work.

@cuongdt1994
I installed Arch linux, there is already a parport_pc in the kernel, the device is perfectly defined.
Why it doesn’t work here, I don’t understand, despite the fact that there is no parport module in lsmod

Right, i found in modules ArchLinux support it.

image.png (29×1 px, 2 KB)

Check if it exists in the kernel.

zcat /proc/config.gz | grep PARPORT
vyos@vyos:~$ zcat /proc/config.gz | grep PARPORT
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
# CONFIG_PARPORT is not set
vyos@vyos:~$ uname -a
Linux vyos 6.1.37-amd64-vyos #1 SMP PREEMPT_DYNAMIC Wed Jul  5 12:01:47 UTC 2023 x86_64 GNU/Linux
c-po changed the task status from Open to Needs testing.Aug 12 2023, 4:07 PM
c-po claimed this task.

Enabled inside VyOS kernel - please check with the next available rolling ISO

Hello!

vyos@vyos:~$ zcat /proc/config.gz | grep PARPORT
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
CONFIG_PARPORT=y
# CONFIG_PARPORT_PC is not set
# CONFIG_PARPORT_AX88796 is not set
# CONFIG_PARPORT_1284 is not set
# CONFIG_I2C_PARPORT is not set
# CONFIG_PPS_CLIENT_PARPORT is not set
# CONFIG_USB_SERIAL_MOS7715_PARPORT is not set
vyos@vyos:~$ show version 
Version:          VyOS 1.4-rolling-202309040919
Release train:    current

Built by:         [email protected]
Built on:         Mon 04 Sep 2023 10:38 UTC
Build UUID:       9210cde6-bbb4-47f5-b5dd-14a6afe4fdbf
Build commit ID:  f909a712d635d4

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Gigabyte Technology Co., Ltd.
Hardware model:   EP43T-S3L
Hardware S/N:     
Hardware UUID:    00000000-0000-0000-0000-1c6f652b9d57

vyos@vyos# set service console-server device 
Possible completions:
 > ttySxxx              Regular serial interface
 > usbxbxpx             USB based serial interface
 > ttyS0                
 > ttyS1                
 > ttyS2                
 > ttyS3
Sep 05 04:26:53 localhost.localdomain kernel: serial 0000:02:00.3: Couldn't register serial port d900, irq 19, type 0, error -28
Sep 05 04:26:53 localhost.localdomain kernel: serial 0000:02:00.2: Couldn't register serial port db00, irq 18, type 0, error -28
Sep 05 04:26:53 localhost.localdomain kernel: serial 0000:02:00.1: Couldn't register serial port dc00, irq 17, type 0, error -28
Sep 05 04:26:53 localhost.localdomain kernel: 0000:02:00.1: ttyS3 at I/O 0xdd00 (irq = 17, base_baud = 115200) is a 16550A
Sep 05 04:26:53 localhost.localdomain kernel: 0000:02:00.0: ttyS2 at I/O 0xde00 (irq = 16, base_baud = 115200) is a 16550A
Sep 05 04:26:53 localhost.localdomain kernel: 0000:02:00.0: ttyS1 at I/O 0xdf00 (irq = 16, base_baud = 115200) is a 16550A
Sep 05 04:26:53 localhost.localdomain kernel: 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
Sep 05 04:26:53 localhost.localdomain kernel: Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

I start to think that this card requires an out-of tree vendor driver which is not going to be added by us.

Closing this.