AW: ubsa, ucom Problems

Markus Oestreicher m.oe at x-trader.de
Thu Oct 30 08:35:11 PST 2003


> root at ws02 /dev # cu -l /dev/ucom0
> cu: open (/dev/ucom0): Device not configured
> cu: /dev/ucom0: Line in use
> 
> I do not have -stable with ubsa device handy for testing, but I do use
> one ubsa adapter for my serial console for 5.x daily. Errors below
> certainly indicate the device entry mismatch. The quick and dirty
> solution to try would be a printf right after ubsa/ucom calls 
> makedev on
> udev device to print out device's major/minor address and using mknod
> manually.

Forgive me, I have only basic C knowledge.

I could see that UCOM_CDEV_MAJOR is fixed to 138, but I can see 
no reference to the minor address. 

Can you give me a hint what the print statement could look like?


ucom_attach(struct ucom_softc *sc)
{
        struct tty *tp;
        int unit;

        unit = device_get_unit(sc->sc_dev);

        sc->sc_tty = tp = ttymalloc(sc->sc_tty);
        tp->t_oproc = ucomstart;
        tp->t_param = ucomparam;
        tp->t_stop = ucomstop;

        DPRINTF(("ucom_attach: tty_attach tp = %p\n", tp));

        DPRINTF(("ucom_attach: make_dev: ucom%d\n", unit));

        sc->dev = make_dev(&ucom_cdevsw, unit | UCOM_CALLOUT_MASK,
                        UID_UUCP, GID_DIALER, 0660,
                        "ucom%d", unit);
        sc->dev->si_tty = tp;

        return (0);
}


bye
Markus



More information about the freebsd-stable mailing list