Bug 151766 - usb hiddev reports bogus value
usb hiddev reports bogus value
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-21 22:55 EST by David Zeuthen
Modified: 2015-01-04 17:17 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-02 08:38:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test program that shows defect (19.08 KB, text/plain)
2005-03-21 22:55 EST, David Zeuthen
no flags Details

  None (edit)
Description David Zeuthen 2005-03-21 22:55:34 EST
Description of problem:

value field in struct hiddev_usage_ref returns bogus value most of the time for
my UPS and, I suspect, other USB hiddev devices


Version-Release number of selected component (if applicable):

2.6.11-1.1191_FC4; seen with all 2.6.10 kernels; worked fine with all 2.6.9
kernels that I've tested.

How reproducible:

Always

Steps to Reproduce:

Probably the easiest thing is to update to the latest hal and try to attach a
usbhid compliant UPS - start hal-device-manager; navigate to the UPS entry and
see missing values for UPS (e.g. battery.serial, battery.technology).
  
Actual results:

value field in struct hiddev_usage_ref returns bogus value most of the time for
my UPS and, I suspect, other USB hiddev devices

Expected results:

Behavior from 2.6.9 series should be restored

Additional info:

Code in question is here
 http://cvs.freedesktop.org/hal/hal/hald/linux2/addons/addon-hid-ups.c?rev=1.4&view=auto

Will attach small sample program from apcupsd that also demonstrates the defect.

Can also bring hardware to Westford if needed.
Comment 1 David Zeuthen 2005-03-21 22:55:35 EST
Created attachment 112201 [details]
test program that shows defect
Comment 2 David Zeuthen 2005-03-21 23:04:36 EST
Further, here's a screenshot on how it should look with the values properly set
(e.g. battery.technology etc.)

 http://people.redhat.com/davidz/hal-hid-ups.png
Comment 3 Dave Jones 2005-10-06 01:15:53 EDT
For my ups on current FC4 kernel, after a few pages of spew, it prints this out
every second or so..

Event: Charging = 0
Event: Discharging = 0
Event: APCStatusFlag = 8
Event: RemainingCapacity = 100
Event: RunTimeToEmpty = 784
Event: Charging = 0
Event: Discharging = 0
Event: ACPresent = 1
Event: BatteryPresent = 1
Event: BelowRemainingCapacityLimit = 0
Event: ShutdownImminent = 0
Event: RemainingTimeLimitExpired = 0
Event: CommunicationLost = 0
Event: NeedReplacement = 0
Event: Overload = 0
Event: VoltageNotRegulated = 0

Correct behaviour ?
Comment 4 Dave Jones 2006-03-02 03:13:14 EST
so given todays awesome demonstration of ups status monitoring, I'm assuming
this got fixed at some point ?
Comment 5 David Zeuthen 2006-03-02 08:38:18 EST
Yea, this did get fixed some time ago. Closing.

Note You need to log in before you can comment on or make changes to this bug.