usb to serial

Hans Petter Selasky hselasky at c2i.net
Fri Nov 10 10:57:42 UTC 2006


On Friday 10 November 2006 10:08, Maxim Konovalov wrote:
> Hi Hans,
>
> On Fri, 10 Nov 2006, 08:38+0100, Hans Petter Selasky wrote:
> > On Thursday 09 November 2006 18:29, Maxim Konovalov wrote:
> > > [ iedowse CC'ed ]
> > >
> > > Hello,
> > >
> > > On Fri, 5 May 2006, 11:04-0400, David Coder wrote:
> > > > thx for the suggestions, guys.  with
> > > >
> > > >  device uftdi
> > > >  device uplcom
> > > >
> > > > in the kernel config the adapter shows up as
> > > >
> > > >  ugen0: ArkMicroChips USB-UART Controller, rev 1.10/0.01, addr 2
> > > >
> > > > no specific com port shows up, however, so i must need something
> > > > else.
> > >
> > > Alex Rodin have ported uark(4) driver from OpenBSD.  I made code
> > > cleanup and intergation in the tree.  You can get&test patches for
> > > HEAD and RELENG_6 there:
> > >
> > > http://maxim.int.ru/stuff/uark.diff
> > > http://maxim.int.ru/stuff/uark.diff.6
> > >
> > > Ian, could you please review the patches?
> >
> > Hi, do you think that you could also port the serial driver to the new
> > USB stack, and send me a patch file?
> >
> > Please see:
> >
> > http://www.turbocat.net/~hselasky/usb4bsd
> >
> > Download the SVN version, and type "svn diff" to generate a patch when
> > you are finished. Look at the other serial drivers in my SVN tree, how
> > the USB/UCOM stuff is done.
>
> Are there any correlations with p4://depot/projects/usb?

Yes, it is the same.

>
> The second question: is it OK to commit uark(4) as is and then convert
> it to the new model?

I would prefer no. It is better to commit "uark(4)" to the USB p4 project, 
than HEAD, because then we don't have to worry about integrating the driver.

I looked at your uark.diff, and it shouldn't be too difficult to port it to 
the new USB architecture.

Have a look at "ufoma.c":

http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/dev/usb/ufoma.c

From what I can see you need to:

Make a config thread, from where you do the configuration. You should not call 
usbd_do_request() directly from the ucom callbacks!

Add config for the USB BULK transfers needed.

And a little more.

Do you have hardware that you can test the UARK driver with?

--HPS


More information about the freebsd-usb mailing list