Re: ethlcd driver improvements
Markus Dolze <[email protected]>
| Newsgroups | gmane.comp.sysutils.lcdproc |
|---|---|
| Message-ID | <[email protected]> |
On 29.03.2011 13:07, Mariusz Bialonczyk wrote: > On 2011-03-28 21:50, Markus Dolze wrote: >> There is no way for a driver to signal the core to exit once the driver >> is running, so using exit() is the only option if you want to quit LCDd. >> However no cleanup of memory is performed then. > I also was searching the way of clean exit from driver, but I can see > that returning -1 works only in init function. So I used the same > method like ie. in hd44780-ftdi.c. Do you think it would be better if > I free some (PrivateData?) structures before? I know it would be a lot > better if I do some kind of clean exit - but if I am correct, it > also needs some changes not only in my driver. Actually, I have not recognized this in the hd44780-ftdi driver before. Freeing up PrivateData would only free parts of the used memory as the driver structure, clients, screens, etc. is maintained by the server core. So freeing it only makes little difference. > >> What may be reasons why a send / receive fails? If it is the TCP >> connection that broke maybe reconnecting may be an idea? > From experience with my device I can tell that it sometimes hung > (hardware). > Then even ping packet are not replied. The only way to fix such a state > is to cycle device's power. But this situation is very very rare - > two-three > times per year, when the device is working fine the rest of time (working > non-stop). > So I also thought about reconecting, but it doesn't help in this case, > especialy because if I even successfuly reconnect after device start, > then > it won't work without executing commands in init function. > OK, I will commit it 'as is' then (and register a 'todo' with it and the hd44780-ftdi driver). Regards, Markus