On Tuesday 17 May 2011 23:46:00 Éric Piel wrote::Op 16-05-11 23:36, Christian Lamparter schreef:On Monday 16 May 2011 13:16:46 Éric Piel wrote:
Yes, at least on the HP laptop I have the bios enjoys re-initialising the hardware at some default value whenever suspend/resume happens.Uh, "bios can also interfere"... this sounds very bad. At least forDo you know how "volatile" this data rate is? If it never changesIt is not normally changing, normally it is set just at init/unsuspend
[at least it doesn't here?] then why not read it once in init_device
and store it in the device context?
(where the bios can also interfere sometimes) and when the user changes
it.
my x41t the bios doesn't care about hdaps once the OS is running.
So definitely within the same function it's not going to suddenlya SMM can happen at any time and if a faulty BIOS [likely, since I got
change.
a new laptop] is what caused the crash, I wouldn't bet on "const within
a function context".
I didn't know about the SMM... well, then let's keep the code as is.We could avoid calculating/checking it twice inI have my doubts, but ok if you say so... Just one thing: need to do some Q&A
lis3lv02d_selftest(). Care to do a third version with this little clean up?
on the code above, I haven't tested it extensively yet.