2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 14:25:39 +00:00
Commit Graph

2477 Commits

Author SHA1 Message Date
Jean Delvare
8c2cf94413 Insist on the fact that 2.4 kernels have an outdated i2c
subsystem.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2519 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-09 17:01:17 +00:00
Jean Delvare
4e6fcb41d4 Backport memory allocation reworking from Linux 2.6.
Cleanup detach function.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2518 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-09 11:00:59 +00:00
Jean Delvare
994875c0e4 Update.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2517 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-09 07:52:44 +00:00
Jean Delvare
5313a73781 Discard unused variable in private driver data.
Less agressive initialization process (do not reset the chip,
        closes ticket #1154; preserve application mode)
        Fix temp1 (instead of temp2) limits being unsettable in application
        mode 2 (tickets #894 and #1219).
        Ensure that temp2 and in4 are not used at the same time (ticket
        #894).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2516 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-09 07:24:37 +00:00
Jean Delvare
ca46e7476a Add comment about the GL520SM's application modes.
Do not set GL520SM's mode by default.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2515 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-09 07:14:43 +00:00
Jean Delvare
12e4bc4853 Follow new sysfs naming scheme.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2514 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-08 19:38:20 +00:00
Jean Delvare
7f22c17c1b Update links to my own pages.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2513 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-08 15:48:07 +00:00
Jean Delvare
3f690ffac2 Backport memory allocation reworking from Linux 2.6.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2512 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-08 13:37:41 +00:00
Jean Delvare
16628b5165 Patches by Aurelien Jarno:
I found a small bug in sensors and sensord when used with a w83781d
chip. On this chip the alarms for temp2 and temp3 are merged. However
that is not handled in sensors and sensord.

Please find attached two patches to fix that, one concerning sensors and
the other one concerning sensord.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2511 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-08 12:24:16 +00:00
Jean Delvare
f032b85a9d Use new sysfs file name conventions. Suggested by Rutger
Nijlunsing.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2510 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-08 11:33:47 +00:00
Jean Delvare
5f48e8e6ad Patch by Aurelien Jarno:
When running sensors-detect on a system with devfs enabled, and the
/proc/mounts report its device different from 'none' (for example devfsd
uses 'devfs' as device name), sensors-detect don't detect devfs and try
to use normal names for i2c devices.

The attached patch fixes that.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2509 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-08 11:26:47 +00:00
Jean Delvare
adcd61f1c5 Update.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2508 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-08 10:15:57 +00:00
Jean Delvare
967bbba20d Do not include SENSORS_INSMOD stuff.
Rework chip initialization.
        New module parameter: init.
        Honor pwm invert bits again.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2507 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-08 10:14:51 +00:00
Jean Delvare
e58bec5c89 Forcibly enable in7, in8, in10 and temp3 at init time. They are
internal so they have to exist.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2506 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-02 19:02:00 +00:00
Jean Delvare
6e64cc2517 Lock on reads and writes.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2505 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-02 18:28:22 +00:00
Jean Delvare
4ef5ecd429 Inverse beep bits of the as99127f in the driver rather than in the
user-space.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2504 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-02 13:49:14 +00:00
Jean Delvare
6ac599754a New --rrd-no-average parameter.
Syncronize time slots with rrd.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2503 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-01 19:18:53 +00:00
Jean Delvare
3803f854a6 Do not read fan data when monitoring is disabled.
Zero private data on init, since channels can be disabled.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2502 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-01 19:08:55 +00:00
Jean Delvare
e259edf917 Allow probing range selection.
Fix quick writes and byte reads being swapped in default mode.
        Misc fixes.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2501 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-01 14:43:38 +00:00
Jean Delvare
9367184cd4 Update.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2500 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-05-01 14:00:36 +00:00
Jean Delvare
52ebd5827d Add a few voltage limit settings for pc87366.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2499 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-30 21:33:42 +00:00
Jean Delvare
fd1169752d Use a different vref if set to external.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2498 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-30 21:19:39 +00:00
Jean Delvare
50e0fc00ee Preliminary pc87366 section.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2497 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-30 21:18:31 +00:00
Jean Delvare
d51832bad3 Simplify temperature conversions.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2496 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-30 17:37:09 +00:00
Jean Delvare
b46272cb2a Add some temporary PWM debugging stuff.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2495 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-30 16:57:14 +00:00
Jean Delvare
ab201099f6 Support GeForce FX 5900 video cards.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2494 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-30 16:56:41 +00:00
Jean Delvare
16de9f7fc4 Remove mysterious pseudo-white-space characters.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2493 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-30 16:46:39 +00:00
Jean Delvare
bb5da5b8a8 Ignore fan invert configuration bits.
Do not depend on "new data ready" bit for fan speed update.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2492 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-29 21:34:39 +00:00
Jean Delvare
dbc993ac93 Default configuration section for LM85-like chips.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2491 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-29 19:53:27 +00:00
Jean Delvare
4d095e0921 New manual page for isaset.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2490 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-29 17:43:50 +00:00
Jean Delvare
62b7916019 Add missing include.
Discard unused hexchar function.
        Massive reindent.
        Rework the command line parameters handling.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2489 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-29 17:24:45 +00:00
Mark D. Studebaker
6f821d2ad8 new isaset program. Warning - lightly tested.
Please test and improve as necessary.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2488 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-28 23:54:09 +00:00
Jean Delvare
acbe389aa9 Use the correct alarm bits for pc87366 temperatures and voltages.
Refactor pc87366 temperatures and voltages code.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2487 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-28 18:10:47 +00:00
Jean Delvare
352fb41c68 Fix fan configuration being read from the wrong registers.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2486 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-28 18:07:52 +00:00
Jean Delvare
084a788bc6 Mask voltage and temperature alarm registers.
Fix temp status sysctl values.
        Clear fan alarms after we read them.
        Do not read invalid or old fan values.
        Do not read voltage and temperature alarms on fan-only chips.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2485 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-27 18:56:06 +00:00
Jean Delvare
23eed72eb1 Fix pc87366 temp alarms.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2484 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-27 18:24:29 +00:00
Mark D. Studebaker
cf3e2b8cef remove unused variables
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2483 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-27 01:11:32 +00:00
Mark D. Studebaker
b0295fe904 move initialization to kernel thread to fix oops
Ticket #1573

--------------

Another update for his issue [kernel panic triggered by bmcsensors}:

The source of the problem are the non-atomic kernel mallocs for device
registration called from an interrupt context - this doesn't seem to be
supported and as observed can crash the kernel.

A possible solution  is to create a kernel thread on initialisation,
leave that thread hanging round while the device scan runs, and finaly
signal the init thread when device scan is complete to finish
initialisation be registing the sensors found during scan.

A patch implementing such a scheme was created by Yvon JEGOU, I'll post
it here again.

Thanks, Martin

--------------

Hi Mark,


>> I don't fully understand... sorry if I'm slow.
>> is the problem doing mallocs from an interrupt context or non-atomic
>> mallocs?
>> what's non-atomic about the malloc?
>> how did we get in an interrupt context?


Being no kernel programmer this is fairly hard form me to answer; lets
see how far I get

The problem is non-atomic kmallocs from an interrupt context.

Non-atomic refers to the flags specified in the kmalloc call (GFP_ATOMIC
vs. GFP_KERNEL) (Ref. http://lwn.net/Articles/22909/)

Scanning for sensors is triggered by sending an ipmi message in
bmcsensors_reserve_sdr. Building the list of sensors and finally
creating the required proc entries happens on subsequent reception of
ipmi messages in the ipmi call-back. If I understand correctly how
things interact, that would be in an interrupt context.

Where bmcsensors blows up when trying to register lots of sensors is the

-> bmcsensors_command (which is the i2c-ipmi call-back)
-> bmcsensors_msg_handler
-> bmcsensors_rcv_msg
-> bmcsensors_rcv_sdr_msg
-> bmcsensors_build_proc_table
-> i2c_register_entry
-> create_proc_entry
-> proc_create
-> kmalloc

sequence.

My limited understanding of kernel programming is that if memory is
allocated in an interrupt context, GFP_ATOMIC must be used.

While the kmallocs done directly by bmcsensors_build_proc_table would be
fixable, the calls in proc_create_entry are obviously not changeable.
This makes proc_create and its callers unsafe for use in an interrupt
context.

The patch works around this limitation by creating a separate kernel
thread from sm_bmcsensors_init and calling bmcsensors_build_proc_table
from this thread after scanning for sesnsors has finished.

Hope I've managed to adequately explain what I think is wrong.

Bye, Martin


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2482 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-27 01:10:49 +00:00
Jean Delvare
eb13a07e48 Be concurrent-access safe (i.e. ensure than no bank change occurs
in our back).
        Fix compilation without DEBUG.
        Do not read in and temp alarms more than needed.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2481 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-26 17:53:43 +00:00
Jean Delvare
cc405777c3 Misc fixes.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2480 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-26 17:01:24 +00:00
Jean Delvare
f33169d5cd Retrieve fans configuration from Super-I/O space; export
pwm_enable (read-only); handle fan invert.
        Fix temp_crit being read from temp_min register.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2479 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-26 16:58:52 +00:00
Jean Delvare
80968de0a9 Fix setting voltage limits. This got broken by my previous
fix of inaccurate voltage roundings.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2478 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-25 19:43:54 +00:00
Jean Delvare
f5a0f7d493 Add some debug output.
Show more status bits (voltages and temperatures).
        Fix incorrect use of const.
        Clear status bits on update.
        Fix temperature reads (min, crit and current).
        Fix temperature writes (min).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2477 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-25 15:23:32 +00:00
Jean Delvare
0738cd0915 Document the new flat address options.
Add a few notes.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2476 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-25 13:30:21 +00:00
Jean Delvare
ad91c909d8 Add bank support to flat address space mode.
Default to bank register 0x07 for Super-I/O chips.
        Move default bank register selection to a separate function.
        Move setting/restoring bank to a separate function.
        Allow dumping of shorter ranges (flat address space mode).
        Limit I2C-like dumps to addresses up to 0x3fff.
        Print expected ranges on range errors.

        This should allow us to work with the PC87360 family of chips.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2475 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-25 13:26:45 +00:00
Jean Delvare
44014e8b70 Correctly handle the case where some of the logical devices are
disabled.
        Add KERN constants to printks.
        Reindent.
        Fix error path in detect function.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2474 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-25 06:53:07 +00:00
Jean Delvare
7c8db8e5ff Fix driver not being called by i2c-proc.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2473 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-24 21:29:01 +00:00
Mark D. Studebaker
39d1d4dfa5 remove old library versions in make clean
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2472 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-24 17:31:34 +00:00
Jean Delvare
635b1b06bc Support the LM99 (and LM89).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2471 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-24 08:10:48 +00:00
Jean Delvare
07575dbb7f Update via686a section, new lm99 section.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2470 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-24 08:10:16 +00:00