Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Oct 2003 17:35:05 +0100
From:      "Markus Oestreicher" <m.oe@x-trader.de>
To:        "'Alexander Kabaev'" <ak03@gte.com>
Cc:        freebsd-stable@freebsd.org
Subject:   AW: ubsa, ucom Problems
Message-ID:  <005f01c39f03$c666ccd0$02c0a8c0@gnbuero.qhintra.net>
In-Reply-To: <20031029112353.3e34aea8.ak03@gte.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> root@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005f01c39f03$c666ccd0$02c0a8c0>