Serial multiport error Oxford/Startech PEX2S952

Greg Byshenk freebsd at byshenk.net
Wed Aug 24 07:06:33 UTC 2011


On Mon, Aug 22, 2011 at 11:59:11AM +0100, David Wood wrote:
 
> In message <20110822094756.GJ92605 at core.byshenk.net>, Greg Byshenk 
> <freebsd at byshenk.net> writes
> >It doesn't seem to matter; both cuau?.lock and cuau?.init produce the
> >error (for both ports), and cuau? itself remains a no-op.
> 
> You could try
> hint.uart.2.baud="115200"
> 
> in /boot/device.hints - making the relevant changes to port number and 
> speed according to your needs.

This does not help; speed remains set to 9600.
 
 
> >Now that I can see that the card is working (at least minimally), it
> >begins to look as if there might be a problem somewhere in 9.x. I'll
> >try to install 8.x and see if the results are different.
> 
> It will be interesting to see if there is a difference between 8.x and 
> 9.x.

Yes, there is.

Using 8-STABLE (with sources from 17 August 2011) and inbuilt puc,
the controller works as expected. It defaults to 9600, but setting
the speed on the cuaa?.lock and cuaa?.init devices works.

Interestingly, setting the speed in device.hints does _not_ work.


So, it appears that there is something wrong (or at least different)
with 9.x

Doing some poking around, I see that, in 9.x, termios.h is not
included in dev/uart/uart_core.c and dev/uart/uart_tty.c. While
it is included under 8.x.

If I look at the 8.x .c files, they want 

	#include <sys/termios.h>

... which appears to no longer be used. But adding either that,
or

	#include <termios.h>

... produces errors:

	/usr/src/sys/dev/uart/uart_core.c:47:21: error: termios.h: No such file or directory
	/usr/src/sys/dev/uart/uart_tty.c:42:21: error: termios.h: No such file or directory
	mkdep: compile failed
	*** Error code 1

Though a fresh build of world seems to produce termios.h:

	# find /usr/obj/ |grep termios.h
	/usr/obj/usr/src/lib32/usr/include/sys/termios.h
	/usr/obj/usr/src/lib32/usr/include/sys/_termios.h
	/usr/obj/usr/src/lib32/usr/include/termios.h
	/usr/obj/usr/src/tmp/usr/include/termios.h
	/usr/obj/usr/src/tmp/usr/include/sys/termios.h
	/usr/obj/usr/src/tmp/usr/include/sys/_termios.h
	# 

But I may be completely confused here, as I don't pretend to be
familiar with all of the details of the build process.


Does this look like a bug with 9.x, or something that should be
done differently?


-- 
greg byshenk  -  gbyshenk at byshenk.net  -  Leiden, NL


More information about the freebsd-stable mailing list