On Fri, 2018-02-02 at 15:10 +0100, Nikola Ciprich wrote: > Hi guys, > > sorry for the delay, here are the files: > > http://nik.lbox.cz/download/ > > lb7.01 is without the patch, lb7.02 is with it. I'm going to check them, thanks. > so far we've been using those boards (well, virtualy thousands > of them) with 4.4.52. I'm setting them up manually by script Ah, that makes a clear picture! > which checks lspci output, gets parameters from there and > then uses setserial: > > BRAINBOX_ID="135a:4100 (rev 02)" > > $LSPCI 2>/dev/null | grep -q "${BRAINBOX_ID}" && { > > irq=`$LSPCI 2>/dev/null | grep "${BRAINBOX_ID}" -A6 | sed -n -e > "s|.*IRQ \([[:digit:]]\+\).*|\1|p"` > addr=`$LSPCI 2>/dev/null | grep "${BRAINBOX_ID}" -A6 | awk > '/size=64/ {print $4}'|tr [:lower:] [:upper:]` > ppaddr=0x`$LSPCI 2>/dev/null | grep "${BRAINBOX_ID}" -A7 | awk > '/size=16/ {print $4}'|tr [:lower:] [:upper:]` > > addr2=$addr > addr3=`echo "obase=16;ibase=16;$addr2+8" | bc` > addr4=`echo "obase=16;ibase=16;$addr3+8" | bc` > addr5=`echo "obase=16;ibase=16;$addr4+8" | bc` > addr6=`echo "obase=16;ibase=16;$addr5+8" | bc` > > echo "Found BrainBoxes PX272/PX306 MIO card (ID 4100 rev 02)" > echo "Setting up five serial ports: IRQ $irq, I/O at $addr2, > $addr3, $addr4, $addr5, $addr6" > /bin/setserial /dev/ttyS2 port 0x$addr2 irq $irq baud_base 921600 > spd_normal skip_test autoconfig > /bin/setserial /dev/ttyS3 port 0x$addr3 irq $irq baud_base 921600 > spd_normal skip_test autoconfig > /bin/setserial /dev/ttyS4 port 0x$addr4 irq $irq baud_base 921600 > spd_normal skip_test autoconfig > /bin/setserial /dev/ttyS5 port 0x$addr5 irq $irq baud_base 921600 > spd_normal skip_test autoconfig > /bin/setserial /dev/ttyS6 port 0x$addr6 irq $irq baud_base 921600 > spd_normal skip_test autoconfig > } Nice trick! Though, it doesn't explain why IRQ matters. It's pretty much okay that IRQ line number is changed according to internal routing. Perhaps, you at some point can provide a board data to for these boards to be enumerated automatically. > with proposed patch, it now works for 4.14 as well.. Be aware, it's not final version, I would ask you to test a new one a bit later. -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html