[Nut-upsuser] Unitek UPS 1250xD - megatec_usb driver

Carlos Rodrigues carlos.efr at mail.telepac.pt
Sun Feb 17 20:29:36 UTC 2008


On Feb 17, 2008 7:56 PM, Alexander I. Gordeev <lasaine at lvk.cs.msu.su> wrote:
> > The best solution would probably to ignore the first couple of failures in
> > the 'megatec.c' driver, before declaring data stale. Generally speaking,
> > one should be careful to declare data stale and only do so after a couple
> > of attempts to read the status (typically three in a row) have failed.
>
> I like the idea of solving this in megatec.c. Both serial and usb
> interfaces could easily fail.

If the driver fails to get any data in the current polling cycle, it
declares the data as stale until the next cycle. It tried to read the
data, it got nothing, ergo the current data is stale. I don't agree
the driver should systematically retry reading the status within a
polling cycle.

However, if communication failures are a systematic problem over USB,
the USB layer should deal with it appropriately.

-- 
Carlos Rodrigues



More information about the Nut-upsuser mailing list