Arjen de Korte
2011-Jun-28 18:51 UTC
[Nut-upsdev] [nut-commits] svn commit r3071 - branches/apcsmart-dev/drivers
Citeren Michal Soltys <msoltyspl-guest at alioth.debian.org>:> Log: > apcsmart: allow tearing down/setting up serial connection during > normal activity;If this is needed at all (why?), I don't think this should be handled at driver level, but this would need to be in the serial.c library. Opening/closing a serial port is independent from the protocol used (no data is to be transmitted), so if there is a need for the apcsmart driver, likewise we will need this for other serial drivers as well. We certainly don't want to duplicate this code for every serial driver we support. One thing I fail to understand is why a driver should be able to close a connection to the serial port. Could you please elaborate on that?> changes should fix #535583 as wellPlease be a little more verbose in your patch comments. It took me a while to find that this was not a bug on Alioth, but on Ubuntu instead. This may be obvious for you, this information will be lost once this makes it into the drivers ChangeLog. Best regards, Arjen -- Please keep list traffic on the list (off-list replies will be rejected)
Michal Soltys
2011-Jun-30 10:47 UTC
[Nut-upsdev] [nut-commits] svn commit r3071 - branches/apcsmart-dev/drivers
On 11-06-28 20:51, Arjen de Korte wrote:> Citeren Michal Soltys <msoltyspl-guest at alioth.debian.org>: > >> Log: >> apcsmart: allow tearing down/setting up serial connection during >> normal activity; > > If this is needed at all (why?), I don't think this should be handled at > driver level, but this would need to be in the serial.c library. > Opening/closing a serial port is independent from the protocol used (no > data is to be transmitted), so if there is a need for the apcsmart > driver, likewise we will need this for other serial drivers as well. We > certainly don't want to duplicate this code for every serial driver we > support. One thing I fail to understand is why a driver should be able > to close a connection to the serial port. Could you please elaborate on > that? >It was one of the suggestions on that ubuntu's bugtracker (which Arnaud pointed me to). Supposedly reopening serial port could help with some pci based rs232 card. Flushing stale data was another thing to do (which the driver is doing now). https://bugs.launchpad.net/ubuntu/+source/nut/+bug/535583/comments/10 Truth to be told, I don't really like the final effect - for the same reason you mentioned - as I pretty much duplicated the serial.c's code, with major difference being return <something> vs. fatalx() . The change is more along the lines "it won't hurt to do that just in case". I could revert it to the earlier version and keep only non-serial related changes. It works fine, but certainly feels out of place a bit.>> changes should fix #535583 as well > > Please be a little more verbose in your patch comments. It took me a > while to find that this was not a bug on Alioth, but on Ubuntu instead. > This may be obvious for you, this information will be lost once this > makes it into the drivers ChangeLog. > > Best regards, ArjenWill do. I tried to be as terse as possible, though it looks like I overdid a bit.
Reasonably Related Threads
- [nut-commits] svn commit r3104 - branches/apcsmart-dev/drivers
- [nut-commits] svn commit r3081 - branches/apcsmart-dev/drivers
- Battery runtime not displaying
- [RFC apcsmart V3 00/18] apcsmart driver updates
- [RFC/PREVIEW] Move apcsmart driver to canonical processing + minor stuff