* Matthew Howell <matthew.howell@xxxxxxxxxxxx> [230905 15:05]: > On Sat, 2 Sep 2023, Tony Lindgren wrote: > > OK. If the patch did not apply against v6.5, can you please verify you don't > > have other patches applied like your revert? I don't think the patch I sent > > is white space damanged or anything. Doing git diff v6.5.. should show you > > what might be different :) > > It shouldn't have had any patches applied to. Just verified again by > running git diff after pulling the v6.5 branch, but git diff shows no > differences. > > I suspect alpine may be mangling the text on my end in some way. If I > apply the changes manually and then run git diff v6.5 the patch looks the > same as what you provided, but tab/spaces are different. OK thanks for checking. > > Not sure what you mean with the 8250 entries from before loading the > > patched driver.. > > > > Maybe things go wrong already somewhere earlier if the integrated 8250 > > port(s) don't show up either? If so, maybe this issue is somehow machine > > specific rather than 8250_exar specific. > > I should have been more specific there. I was actually referring to > 8250_exar entries, not 8250 entries. I have not had any issues with the > base 8250 driver loading. Ah OK sorry I misunderstood. > HOWEVER, I did just find something very interesting. When I first found > the issue my running kernel was still an RC version (6.5-RC4, I > believe). The issue did NOT occur in the running kernel, or when building > 8250_exar from the 6.5-RC4 source. I expected the issue to exist in the > running kernel after I updated to 6.5, but this is NOT the the case. > XR17V35X devices still work in my running kernel. It is only when I build > from source AND the source contains the port_id changes that the issue > occurs. My current kernel is 6.5.0-1-MANJARO. > > Could I be doing something wrong here that for some reason only > manifests itself in combination with the port_id change? > > The only things I can think of are: > 1) insmod does not account for dependencies, so in theory I could be > failing to build and load some other required module. However, modprobe > indicates 8250_exar has no dependencies, so I didn't think this should be > an issue. If you are not using modprobe, and have CONFIG_SERIAL_CORE=m, you need to load serial_base.ko. I don't think we can build the core stuff as as serial_core.ko without renaming serial_core.c to something else. Looks like your config has SERIAL_CORFE built-in though, and without the serial core stuff you'd likely get "Unknown symbol in module" error loading 8250_exar. > 2) The Arch/Manjaro Kernel I am running does not actually have the port_id > change, even though it should. Do you know of an a wy to determine this? Well I guess you could check the patches applied to that kernel, but presumably it's v6.5 for that part. > The general build procedure I have been using is: > > ## Clone v6.5 tagged kernel source > git clone --depth=1 https://github.com/torvalds/linux.git --branch v6.5 > > ## Link symvers > ln -s /usr/lib/modules/$(uname -r)/build/Module.symvers . > > ## Copy existing config > zcat /proc/config.gz > .config > > ## Make sure 8250_exar is built as a module. Disable auto-version. > sed -i '/CONFIG_SERIAL_8250_EXAR=/c\CONFIG_SERIAL_8250_EXAR=m' .config > sed -i '/CONFIG_LOCALVERSION_AUTO=/c\CONFIG_LOCALVERSION_AUTO=n' .config > sed -i '/CONFIG_LOCALVERSION=/c\CONFIG_LOCALVERSION=""' .config > make modules_prepare LOCALVERSION=-MANJARO EXTRAVERSION=-1 > > ## Apply patch, if applicable > patch -p1 < patch.diff > > ## Build and load module > make M=drivers/tty/serial/8250/ > sudo rmmod 8250_exar Maybe check if rmmod 8250_exar now somehow causes the following insmod 8250_exar attempts to fail? > sudo insmod drivers/tty/serial/8250/8250_exar.ko > > > Can you please post or email me your full working dmesg output, failing > > dmesg output, the kernel .config used, and kernel command line? > > --- > Kernel Command Line: > quiet splash resume=UUID=46a37dda-0d60-4ed1-94ea-9219fbe85dde udev.log_priority=3 iomem=relaxed > --- > > --- > dmesg start > Note: Everything before [ 1149.943049] is prior to loading the module > built from source. The successful version looks the same, except instead > of the error message I see the same ttyS4 and ttyS5 at MMIO... messages > that appeared before. OK yeah thanks, not seeing anything wrong early in the dmesg. Regards, Tony