Skip to contentSkip to conversation

PATCH: IPMI driver

PATCH Dave Jones 4 participants 10 messages Jan 9, 2003 1 message not in the archive

lore
Share & tools
lore

Dave Jones

author
#1 lore raw
In reply to a message not in the archive
Quoted 7 lines

ChangeSet 1.980, 2003/01/08 22:23:15-02:00, [email protected]

[PATCH] PATCH: IPMI driver

This has been in -ac for a short while. Linus accepted and merged the same IPMI support into 2.5.54 so now it can move into 2.4 IMHO

Quoted 13 lines
 Documentation/IPMI.txt              |  341 ++++++
 drivers/char/Makefile               |    5 
 drivers/char/ipmi/Makefile          |   20 
 drivers/char/ipmi/ipmi_devintf.c    |  532 ++++++++++
 drivers/char/ipmi/ipmi_kcs_intf.c   | 1235 ++++++++++++++++++++++++
 drivers/char/ipmi/ipmi_kcs_sm.c     |  467 +++++++++
 drivers/char/ipmi/ipmi_kcs_sm.h     |   70 +
 drivers/char/ipmi/ipmi_msghandler.c | 1811 ++++++++++++++++++++++++++++++++++++
 drivers/char/ipmi/ipmi_watchdog.c   |  971 +++++++++++++++++++
 include/linux/ipmi.h                |  516 ++++++++++
 include/linux/ipmi_msgdefs.h        |   58 +
 include/linux/ipmi_smi.h            |  144 ++
 12 files changed, 6170 insertions(+)

Either I'm blind, or none of those files exist in Linus' tree looking at current bitkeeper snapshot.

Dave

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#2 lore raw
Quoted 3 lines · Dave Jones

Either I'm blind, or none of those files exist in Linus' tree looking at current bitkeeper snapshot.

Arghhh I was told Linus accepted it, and my tree indexer found "IPMI" so decided it was present too. (Only the i2c definitions apparently). Oh well, it should be in 2.5

author
#3 lore raw
Quoted 2 lines · Alan Cox

Arghhh I was told Linus accepted it, and my tree indexer found "IPMI" so decided it was present too. (Only the i2c definitions apparently).

Shouldn't cause any problems in 2.4 anyways should it ? After all, its 'just another driver'.

Quoted 1 line

Oh well, it should be in 2.5

Added to the queue of bits from the 2.4 changesets list that I'm intending to push to Linus soon.

Dave

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#4 lore raw
Quoted 5 lines · Dave Jones
Quoted 2 lines · Alan Cox

Arghhh I was told Linus accepted it, and my tree indexer found "IPMI" so decided it was present too. (Only the i2c definitions apparently).

Quoted 7 lines

Shouldn't cause any problems in 2.4 anyways should it ? After all, its 'just another driver'.

Quoted 1 line

Oh well, it should be in 2.5

Added to the queue of bits from the 2.4 changesets list that I'm intending to push to Linus soon.

Pull the 2.5 port from openipmi.sourceforge.net saves you doing the port yourself.

#5 lore raw
Quoted 13 lines · Alan Cox
Quoted 10 lines · Dave Jones
Quoted 2 lines · Alan Cox

Arghhh I was told Linus accepted it, and my tree indexer found "IPMI" so decided it was present too. (Only the i2c definitions apparently).

Shouldn't cause any problems in 2.4 anyways should it ? After all, its 'just another driver'.

Quoted 1 line

Oh well, it should be in 2.5

Quoted 8 lines
Quoted 4 lines

Added to the queue of bits from the 2.4 changesets list that I'm intending to push to Linus soon.

Pull the 2.5 port from openipmi.sourceforge.net saves you doing the port yourself.

Definately pull the 2.5 port from there, as there are some differences between the 2.4 and 2.5 versions.

-Corey

author
#6 lore raw
Quoted 5 lines · Corey Minyard
Quoted 3 lines

Pull the 2.5 port from openipmi.sourceforge.net saves you doing the port yourself.

Definately pull the 2.5 port from there, as there are some differences between the 2.4 and 2.5 versions.

I had a quick skim through the patch.
Is the handling of jiffies wraps done correctly ? It doesn't look like it...

time_diff = ((jiffies_now - kcs_info->last_timeout_jiffies)

Dave

Signature · 1 line
| Dave Jones.        http://www.codemonkey.org.uk
#7 lore raw
Quoted 1 line · Dave Jones

time_diff = ((jiffies_now - kcs_info->last_timeout_jiffies)

Thats valid for unsigned maths

	0x00000001 - 0xFFFFFFFF = 0x00000002

Alan

#10 lore raw
In reply to Dave Jones
Quoted 7 lines · Dave Jones
Quoted 4 lines · Corey Minyard
Quoted 3 lines

Pull the 2.5 port from openipmi.sourceforge.net saves you doing the port yourself.

Definately pull the 2.5 port from there, as there are some differences between the 2.4 and 2.5 versions.

Quoted 8 lines

I had a quick skim through the patch.
Is the handling of jiffies wraps done correctly ? It doesn't look like it...

time_diff = ((jiffies_now - kcs_info->last_timeout_jiffies)

Dave

I don't understand why that wouldn't work. Those are both unsigned long values. Assuming twos complement, the time difference could be correct, even in a wraparound case (unless a very large number of jiffies has transpired, but that will never be the case here).

Am I missing something here?

-Corey

author
#8 lore raw
In reply to Alan Cox
Quoted 5 lines · Alan Cox
Quoted 1 line · Dave Jones

time_diff = ((jiffies_now - kcs_info->last_timeout_jiffies)

Thats valid for unsigned maths

	0x00000001 - 0xFFFFFFFF = 0x00000002

Doh, I've made this mistake before.. Thanks for clarifying.

Dave

Signature · 1 line
| Dave Jones.        http://www.codemonkey.org.uk
#9 lore raw
In reply to Alan Cox
Quoted 5 lines · Alan Cox
Quoted 1 line · Dave Jones

time_diff = ((jiffies_now - kcs_info->last_timeout_jiffies)

Thats valid for unsigned maths

	0x00000001 - 0xFFFFFFFF = 0x00000002

Just as a general note (not to Alan), this often appears in ethernet drivers, in their RX and TX producer/consumer ring counters... so don't be surprised if you see this logic elsewhere in the kernel, too.

Jeff