[Nut-upsdev] Re: [Nut-upsuser] MGE Nova AVR 600 USB on FreeBSD

Arjen de Korte nut+devel at de-korte.org
Mon Feb 19 13:21:13 CET 2007


[ moving over to development list ]

>> Should we make this a default, Arnaud?
>>
>> #if SUN_LIBUSB
>> #define DEFAULT_POLLFREQ        10      /* Polling interval, in seconds
>> */
>>                                         /* The driver will do "light */
>>                                         /* poll" between full polls */
>> #else
>> #define DEFAULT_POLLFREQ        30      /* Polling interval, in seconds
>> */
>>                                         /* The driver will wait for
>> Interrupt */
>>                                         /* and do "light poll" in the
>> meantime */
>> #endif
>
> I would prefer not to do so, since this interrupt on sun is only a
> temporary hack, while waiting for the upstream fix.

That only adds bonus points to making this a default when SUN_LIBUSB is
defined. We have no control over 'pollfreq = <whatever>' once it has been
added by users, while we can change the defaults (almost) at will. So
setting a sensible default based on what we find is probably much better
than telling people to add pollfreq if they run FreeBSD or SUN.

> Moreover, lowering the pollfreq will result in some staleness due to
> too much polling. So this fix would end up in creating some more
> problems.

So the question remains, what's sensible? :-)

> That said, I'm not much opposed to your proposition. We only need a
> way to remember that when the upstream fix are there, we will need to
> remove such things... (simply removing the configure part will do by
> side effect, but leave some dead code)

The latter is something we have to deal with any way. I'm fairly confident
that we have quite a bit of dead code in the trunk already. I'll see if I
can cook up a script that verifies that all the #if's and #ifdef's can be
set by configuration tools. We probably should run this at least before
new releases, but it wouldn't hurt to do this more often.

Best regards, Arjen




More information about the Nut-upsdev mailing list