Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Nov 2019 12:28:16 +0100
From:      Milan Obuch <freebsd-hackers@dino.sk>
To:        freebsd-hackers@freebsd.org
Cc:        Oleksandr Tymoshenko <gonzo@bluezbox.com>, Oliver Pinter <oliver.pinter@hardenedbsd.org>
Subject:   Re: UART driver as kld - how?
Message-ID:  <20191104122816.63647120@zeta.dino.sk>
In-Reply-To: <20191103130118.36fa6eec@zeta.dino.sk>
References:  <20191027214209.712d62ca@zeta.dino.sk> <CAPQ4ffuoHRFghwo=okFoNVHw9TYdwFw_wgUxa5_rm6FqjsNVsg@mail.gmail.com> <20191027232956.28b11772@zeta.dino.sk> <20191028191005.GA89835@bluezbox.com> <20191028201952.20a92307@zeta.dino.sk> <20191102214100.500ba493@zeta.dino.sk> <20191103042321.GA49790@bluezbox.com> <20191103130118.36fa6eec@zeta.dino.sk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Nov 2019 13:01:18 +0100
Milan Obuch <freebsd-hackers@dino.sk> wrote:

> On Sat, 2 Nov 2019 21:23:21 -0700
> Oleksandr Tymoshenko <gonzo@bluezbox.com> wrote:
> 
> > Milan Obuch (freebsd-hackers@dino.sk) wrote:  

[ snip ]

> > > I am sure I need docs/description for other functions as well, so
> > > if anybody knows where good uart framework description could be
> > > found, please advice. Or if somebody already has good
> > > understanding of it and could help me with my issues, it wil be
> > > greatly appreciated.    
> > 
> > if you follow uart_dev_snsps.c template, the sc_class is set in
> > probe function:

[ snip ]

> I totally overlooked the obvious... yes, you are right.
> 
> [ snip ]
> 
> > In your case, my guess would be: you either do not set the sc_class
> > member var in probe function or your base var is not the first in
> > the struct.
> >   
> 
> Back to testing... probe function now does work, so I am going to
> analyze what should be done in attach... and why I am getting now
> panic... I'll write again when I find another obstacle I do not
> understand or I have working driver, whatever comes first :)
> 

Now I am getting further... attach works now, device nodes expected are
being created, but there are some warnings mentioning locks on detach.
Also, my hardware design currently does not use interrupts. Do we have
any example of uart device being polled?

Regards,
Milan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191104122816.63647120>