Re: What tty changes - question on porting ltmdm and hcfmdm to FreeBSD 8

2010-04-24 Thread Gary Jennejohn
On Fri, 23 Apr 2010 16:27:12 -0700
Ted Mittelstaedt t...@mittelstaedt.us wrote:

   Setting aside the question of why do we break software that a lot of 
 people use
 (these chips are in use on a lot of laptops) is there a document 
 somewhere that explains
 what changes need to be made in code for this new tty setup?  Or, is 
 there a set
 of magic include files or a conversion shim library that will allow 
 these kinds
 of programs to build without much work?
 
   Or is porting these drivers just so non-trivial that the only way is 
 to just delve into
 the system manuals and delve into the driver code and try to figure out 
 what is
 going on in each?  If that's the case that's probably beyond my ability 
 but I'd
 be happy to serve as a testbed.
 

The guy to ask about this would be Ed Schouten (ed@). AFAICR he did the new
TTY stuff.  I don't know whether he reads these lists.

AFAIK there is no easy way to fix this and there are no backwards compati-
bilty shims or magic header files.

The fundamental problem with ltmdm is that it's a KLD and has to grovel
around in the guts of the kernel.  That makes fixing it decidely non-
trivial.

--
Gary Jennejohn
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: What tty changes - question on porting ltmdm and hcfmdm to FreeBSD 8

2010-04-24 Thread M. Warner Losh
In message: 20100424102255.12d78...@ernst.jennejohn.org
Gary Jennejohn gljennj...@googlemail.com writes:
: On Fri, 23 Apr 2010 16:27:12 -0700
: Ted Mittelstaedt t...@mittelstaedt.us wrote:
: 
:Setting aside the question of why do we break software that a lot of 
:  people use
:  (these chips are in use on a lot of laptops) is there a document 
:  somewhere that explains
:  what changes need to be made in code for this new tty setup?  Or, is 
:  there a set
:  of magic include files or a conversion shim library that will allow 
:  these kinds
:  of programs to build without much work?
:  
:Or is porting these drivers just so non-trivial that the only way is 
:  to just delve into
:  the system manuals and delve into the driver code and try to figure out 
:  what is
:  going on in each?  If that's the case that's probably beyond my ability 
:  but I'd
:  be happy to serve as a testbed.
:  
: 
: The guy to ask about this would be Ed Schouten (ed@). AFAICR he did the new
: TTY stuff.  I don't know whether he reads these lists.
: 
: AFAIK there is no easy way to fix this and there are no backwards compati-
: bilty shims or magic header files.
: 
: The fundamental problem with ltmdm is that it's a KLD and has to grovel
: around in the guts of the kernel.  That makes fixing it decidely non-
: trivial.

The fundamental reason that things changed was due to the locking of
the TTY layer.  These things change over time, and the old APIs made
it very difficult to lock without driver visible changes.

Warner
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: What tty changes - question on porting ltmdm and hcfmdm to FreeBSD 8

2010-04-24 Thread Ted Mittelstaedt

On 4/24/2010 8:29 AM, M. Warner Losh wrote:

In message:20100424102255.12d78...@ernst.jennejohn.org
 Gary Jennejohngljennj...@googlemail.com  writes:
: On Fri, 23 Apr 2010 16:27:12 -0700
: Ted Mittelstaedtt...@mittelstaedt.us  wrote:
:
:Setting aside the question of why do we break software that a lot of
:  people use
:  (these chips are in use on a lot of laptops) is there a document
:  somewhere that explains
:  what changes need to be made in code for this new tty setup?  Or, is
:  there a set
:  of magic include files or a conversion shim library that will allow
:  these kinds
:  of programs to build without much work?
:
:Or is porting these drivers just so non-trivial that the only way is
:  to just delve into
:  the system manuals and delve into the driver code and try to figure out
:  what is
:  going on in each?  If that's the case that's probably beyond my ability
:  but I'd
:  be happy to serve as a testbed.
:
:
: The guy to ask about this would be Ed Schouten (ed@). AFAICR he did the new
: TTY stuff.  I don't know whether he reads these lists.
:
: AFAIK there is no easy way to fix this and there are no backwards compati-
: bilty shims or magic header files.
:
: The fundamental problem with ltmdm is that it's a KLD and has to grovel
: around in the guts of the kernel.  That makes fixing it decidely non-
: trivial.

The fundamental reason that things changed was due to the locking of
the TTY layer.  These things change over time, and the old APIs made
it very difficult to lock without driver visible changes.

Warner
   


I mailed Ed and his response is to look at the changelog of 
sys/dev/uart/uart_tty.c for an
idea of how to rewrite the driver, so I will take a look there.  The 
ltmdm driver was
updated in 2008 for an early version of FreeBSD 8, before the TTY layer 
changes went

in, so that's where I'll start.

Ted
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


What tty changes - question on porting ltmdm and hcfmdm to FreeBSD 8

2010-04-23 Thread Ted Mittelstaedt

Hi All,

 I have a pager monitoring system built on FreeBSD 6.4 that uses the 
ltmdm driver.

(ltmdm is a controllerless winmodem)

 I was looking into updating to FreeBSD 8 and I see that ltmdm and 
hcfmdm are now
both broken.  hcfmdm broke on FreeBSD 7 but it is easily patched to 
build on that.

ltmdm worked on early FreeBSD 8 but after the tty changes went in it broke.

 I was looking into fixing both of these to build on 8 but it seems to 
be non-trivial.
They both spew all kinds of errors of missing various tty structures, 
and when I
search for those in the include files for 8 I get nothing.  It seems 
there's been a fundamental

change in FreeBSD 8 in this layer.

 In googling around I see that a number of other programs out there 
that talk to

serial ports were also busted by the FreeBSD 8 tty changes.  Some have been
patched and some not.  The ones that have been patched do not seem to have
trivial patches made.

 Setting aside the question of why do we break software that a lot of 
people use
(these chips are in use on a lot of laptops) is there a document 
somewhere that explains
what changes need to be made in code for this new tty setup?  Or, is 
there a set
of magic include files or a conversion shim library that will allow 
these kinds

of programs to build without much work?

 Or is porting these drivers just so non-trivial that the only way is 
to just delve into
the system manuals and delve into the driver code and try to figure out 
what is
going on in each?  If that's the case that's probably beyond my ability 
but I'd

be happy to serve as a testbed.

 Yes I know I can use FreeBSD 7 for now.  Yes I know I can use an external
modem, and that winmodems are evil, that I can send a page by e-mailing the
paging company , yadda yadda yadda.  If your only going to suggest a 
workaround,

please don't.

Thanks!

Ted
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org