lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 11 Oct 2009 00:49:58 +0200
From:	Pavel Machek <pavel@....cz>
To:	Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc:	Alexey Starikovskiy <astarikovskiy@...e.de>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Henrique de Moraes Holschuh <hmh@....eng.br>,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] battery: Fix charge_now returned by broken batteries

On Sat 2009-10-10 23:44:42, Miguel Ojeda wrote:
> On Sat, Oct 10, 2009 at 11:25 PM, Pavel Machek <pavel@....cz> wrote:
> > Hi!
> >
> >> >> In "broken" batteries (is it broken finally? or is it expected
> >> >> behaviour?) like mine the old problem will be corrected, as it was
> >> >> only present in the charged state.
> >> >
> >> > I believe you better work around this in userspace... or agree that
> >> >>100% charge is possible.
> >>
> >> I agree that >100% charge is possible while charging (because that
> >> would mean the battery is over the last charged level); however, what
> >> does it mean when charged?
> >
> > Well, maybe the battery only updates full_charge_capacity during
> > powerdown or when the moon is full or something? (IOW you may be
> > breaking already working machines).
> >
> 
> I do not know about batteries as I said, I was waiting for someone to
> point out how batteries (normally/should) work.

Different batteries work very differently, I'm afraid.

> > Or perhaps add quirk based on DMI or something?
> 
> My battery is easily identified by its model name, so maybe we can
> apply the workaround only to known hardware. Still, that is a "heavy"
> solution, as I suppose there are many many battery models in the
> world. That is why I was asking whether some kind of standard/unified
> batteries' values/behavior exists (or implement it) that we can try to
> achieve easily with some heuristics like the one I proposed, instead
> of some kind of huge table-based workaround system.

The heuristics you proposed _will_ break other batteries, so it is not
acceptable without checking for model first.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ