[Nut-upsdev] Driver fix for Ippon BCP800 (06da/0003), blazer_usb.c

Arjen de Korte nut+devel at de-korte.org
Mon Aug 24 14:52:38 UTC 2009


Citeren Danya Alexeyevsky <me.dendik op gmail.com>:

> Thanks to some older discussions on this list I found it quite easy to
> eventually track down problem with using USB cable with some more of
> Megatec/Q1 UPSes. The trick (which is done in megatec_usb, but not in
> blazer_usb) is to read in the junk that somehow gets into read buffers
> before sending any commands. (I inserted debug statements so it's easy
> to see that the data read is really junk: in my case it's most often a
> middle piece of previous query and sometimes is appended with some
> fragments of /proc/self/environment or something).

Thanks for this report. I have slightly modified your patch, but it  
should work out the same.

> I will appreciate if you apply the patch to fix it (although probably
> it's better to have some such flush function defined in usb wrappers
> for every needing driver to use):

The fact that we need to flush the IO buffers, really means that the  
USB to serial implementation is broken, so I'd prefer to do this  
explicitly in the driver.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsdev mailing list