Subject: Re: lkm serial com driver
To: Daniel Brewer <danielb@cat.co.za>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 04/07/2006 16:40:56
--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Apr 06, 2006 at 10:46:52AM +0200, Daniel Brewer wrote:
> Hi
>=20
> I'm having trouble writing an lkm com driver for a serial port add-on boa=
rd
> that we produce.

[snip]

> I've taken the com.c comvar.h and comreg.h and copied them and modified to
> make a pspcom lkm driver. I've changed the bus_space_writes & reads to be
> 32-bit and got it to attach to the pciio. I've managed to get this attach=
ing
> seemingly correctly and it identifies the ns16550a device correctly. The
> problem I'm having, is that I can't open up tty2-5 to open the serial por=
ts.
> It seems like the tty isn't initializing.

I think the problem is that tty2 -> 5 are tied to the original com driver=
=20
instance, not your new one. I think you need to give your com devices a=20
different major number and use it. Then you'll either need to tweak the=20
tty device nodes or make new ones.

Take care,

Bill

--6c2NcOVqGQ03X4Wi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFENviIWz+3JHUci9cRAgHXAJ9Or3Dcef7qyq0Ljl/yp3XY6iTWagCdGjqG
QpRfzDH2WVqWnBB+XhH4rnc=
=YrnG
-----END PGP SIGNATURE-----

--6c2NcOVqGQ03X4Wi--