Skip to contentSkip to conversation

One-liner fix for i2c-velleman (and problems with i2c-tsunami)

DISCUSSION Kelledin 3 participants 14 messages May 19, 2005

lore
Share & tools
lore

Kelledin

author
#0 lore raw
Quoted 4 lines · you

OK, I'd prefer a slightly different fix. We don't include <asm/param.h> in any of our drivers. It seems we include <linux/slab.h> instead, so I think we should do the same for this one. Could you try and confirm it works for you?

Yes, it works with <linux/slab.h> instead of <asm/param.h>.

Quoted 2 lines

The i2c-philips-par driver seems to miss it too. Were you successful building it?

Oddly, yes. i2c-philips-par does not complain, at least.

Quoted 11 lines
Quoted 5 lines

Also, I'm seeing a lot of "cast from pointer to integer of different size" warnings compiling this same driver, mostly having to do with the CTRL macro. This worries me, especially on 64-bit platforms. Should I be worried in this case?

I saw hundreds of warnings on perfectly clean code while I was compiling on a IA-64 system recently. I don't think you should be afraid. Just remove the -Wall flag if you want gcc to leave you alone. If there are still warnings after that, then we will take a look at them.

Well, every one of those warnings is a possible segfault on 64-bit platforms, because the upper 32 bits of a pointer get lost. Actually, in this case (kernel-land code), it might be rather worse--the driver could conceivably end up playing with the wrong memory region, and do so with impunity.

I know there are special cases where this warning can be ignored, but in my experience, such cases are the exception rather than the rule.

Now, on to other things (lm_sensors in particular):

i2c-tsunami does not compile, and its fix is more than just a one-liner. It requires the <linux/slab.h> include, plus the <linux/pci.h> include, plus some changes in static struct initialization to accomodate recent gcc versions.

Its biggest problem, though, is that it's missing a tsunami_ids struct (list of PCI IDs), and this is REALLY a problem. I have no clue what the Tsunami/Typhoon (2127x) PCI IDs are. I know that they're the core logic controller chips on such motherboards as the DP264 and the UP2000 series. I also looked in the <linux/pci_ids.h> header for 2.4.2[01], and the closest macro I could find for this PCI device ID is PCI_DEVICE_ID_DEC_21285. I'm fairly certain that won't do at all.

CVS, as of 20030724, is no better. Last entry for this driver was apparently back in January.

This is especially annoying, as the Tsunami driver is the primary driver that makes lm_sensors useful at all on Alpha.

Unfortunately, I have no such motherboard with this chipset. I'd like to make the driver work anyways. Can people with Typhoon/Tsunami motherboards please volunteer the PCI IDs for these chips? I'd prefer to merge them with the <linux/pci_ids.h> file, then add some #ifdefs to i2c-tsunami.c to make sure the PCI ID macros get defined even on older kernel versions.

Also, the i2c-tsunami driver itself looks...well...unmaintained. Does anyone maintain it now? If it's been abandoned, I can happily take over maintenance, assuming someone can loan or donate enough to build a sufficiently-working Typhoon/Tsunami motherboard setup.

As always, please CC me off-list as I'm not subscribed. (If this thread keeps up, I may as well just subscribe and be done with it.)

Signature · 3 lines
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"
#1 lore raw
Quoted 4 lines

i2c-tsunami does not compile, and its fix is more than just a one-liner. It requires the <linux/slab.h> include, plus the <linux/pci.h> include, plus some changes in static struct initialization to accomodate recent gcc versions.

Hm... And that's the problem exactly? I'm currently not suscribed to the
list, but will try to recompile this code...

Quoted 10 lines

Its biggest problem, though, is that it's missing a tsunami_ids struct (list of PCI IDs), and this is REALLY a problem. I have no clue what the Tsunami/Typhoon (2127x) PCI IDs are. I know that they're the core logic controller chips on such motherboards as the DP264 and the UP2000 series. I also looked in the <linux/pci_ids.h> header for 2.4.2[01], and the closest macro I could find for this PCI device ID is PCI_DEVICE_ID_DEC_21285. I'm fairly certain that won't do at all.

Tsunami/Typhoon chips are not PCI devices. They are core logic which is
transparent to PCI stuff. The only visible parts on the UP2000/DS20 boards is the "real" hardware stuff:
-----------
00:05.0 ISA bridge: Contaq Microsystems 82c693
00:05.1 IDE interface: Contaq Microsystems 82c693
00:05.2 IDE interface: Contaq Microsystems 82c693
00:05.3 USB Controller: Contaq Microsystems 82c693
00:06.0 SCSI storage controller: Adaptec AHA-2940U2/W / 7890 (rev 01)
----------

Quoted 6 lines

CVS, as of 20030724, is no better. Last entry for this driver was apparently back in January.

This is especially annoying, as the Tsunami driver is the primary driver that makes lm_sensors useful at all on Alpha.

Just FYI. Tsunami i2c bus provides an access to a SPD chips only. Other
stuff (such as lm75, adm9240) are accessed via i2c-elektor module. So, in fact UP2000 has to different i2c buses.

Quoted 8 lines

Unfortunately, I have no such motherboard with this chipset. I'd like to make the driver work anyways. Can people with Typhoon/Tsunami motherboards please volunteer the PCI IDs for these chips? I'd prefer to merge them with the <linux/pci_ids.h> file, then add some #ifdefs to i2c-tsunami.c to make sure the PCI ID macros get defined even on older kernel versions.

    Wrong way. ;-))
Quoted 6 lines

Also, the i2c-tsunami driver itself looks...well...unmaintained. Does anyone maintain it now? If it's been abandoned, I can happily take over maintenance, assuming someone can loan or donate enough to build a sufficiently-working Typhoon/Tsunami motherboard setup.

Yes. It's unmaintained due to the fact we have used kernels 2.2.x on our
site, but now we are moving to 2.4 series.

Please Cc me in your mail.

Regards,
Oleg.

#2 lore raw
In reply to Kelledin

Hi,

this patch is required to use i2c-elektor in memory-mapped mode. The
differences are calls to isa_readb & isa_writeb instead of just plain readb & writeb on the older kernels. Without this fix module will not load and will cause kernel oops. I don't known exactly when the kernel guys have moved to isa_*, but for now it's needs to be here. ;-)) The patch is just "ifndef isa_*".

I've no chance to play with 2.6 :-((, probably I will do this later. But
anyway it's better to include this patch rather than nothing...

Regards,
Oleg.

----- Original Message -----
From: "Jean Delvare" <[email protected]>
To: "Oleg I. Vdovikin" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Saturday, July 26, 2003 2:24 AM
Subject: Re: One-liner fix for i2c-velleman (and problems with i2c-tsunami)

Quoted 11 lines
Quoted 3 lines

I've attached i2c-elektor.patch for proper readb/writeb support in
newest kernel. Please incorporate it with your Alpha fixes.

Is "newest kernel" to be understood as 2.4.22 or 2.6.0-pre1? (Just to know if we have to commit your patch to i2c CVS or only Greg on his side.)

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#3 lore raw
In reply to Kelledin
Quoted 18 lines

Here's a snippet of my current patch to give you an idea:

static struct i2c_algo_bit_data tsunami_i2c_bit_data = {

(quoted diff) +7 -6
-
-       bit_tsunami_setsda,
-       bit_tsunami_setscl,
-       bit_tsunami_getsda,
-       bit_tsunami_getscl,
-       10, 10, HZ/2    /* delays/timeout */
+       .setsda         = bit_tsunami_setsda,
+       .setscl         = bit_tsunami_setscl,
+       .getsda         = bit_tsunami_getsda,
+       .getscl         = bit_tsunami_getscl,
+       .udelay         = 10,
+       .mdelay         = 10,
+       .timeout        = HZ/2,
 };
Quoted 3 lines

Apparently gcc-3.2.3/alpha doesn't grok the original method of static initialization. It choked on it badly until I switched it. gcc-2.95.3/x86 seems to like either way just fine.

Hm... We're using Compaq RH 7.2 Alpha distribution. We've a choice of
weird redhat gcc-2.96 and a kgcc which is a egcs-2.91.66. Both compiling this stuff with no errors. Where you have got a precompiled 3.2.3 for alpha? In my opinion it's better to use kgcc then compiling a kernel on alpha anyway. BTW, redhat guys use gcc-2.96 for the purpose...

Quoted 4 lines

Maybe the C standard has changed, or maybe gcc3 is just being a fruitcake. But as the other static structs use a different form of initialization, I decided to accomodate gcc3 and introduce proper consistency in one fell swoop.

Sounds amazing. ;-))

Quoted 10 lines

Hmmm...well, part of the tsunami_driver struct requires a PCI ID table (tsunami_ids). I'm not sure what's supposed to go in that table?

Could it be that someone tried to port the driver to the new API, half-finished it, and left it for dead? lm_sensors-2.7.0 makes no mention of the tsunami_driver struct or the tsunami_ids table. Maybe that little struct arrangement isn't supposed to be there?

If you mean these things

.id_table = tsunami_ids,

then I don't who is doing that... I've attached "reference" version of
the driver to this mail.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

CVS, as of 20030724, is no better. Last entry for this driver was apparently back in January.

This is especially annoying, as the Tsunami driver is the primary driver that makes lm_sensors useful at all on Alpha.

Quoted 6 lines
Quoted 4 lines

Just FYI. Tsunami i2c bus provides an access to a SPD
chips only. Other stuff (such as lm75, adm9240) are accessed via i2c-elektor module. So, in fact UP2000 has to different i2c buses.

Ah, I never knew about that. Good info to have, thanks.

I've attached i2c-elektor.patch for proper readb/writeb support in
newest kernel. Please incorporate it with your Alpha fixes.

Quoted 1 line

What Alpha motherboards support sensors like that, btw?

Tsunami chips are used on most low-end Alpha 21264 systems, both from
Compaq and Samsung (former Alpha Processor Inc.) systems. PCF8584 (elektor) chips are used on Samsung UP2000, UP2000+ boards and similar systems (I do not remember exactly) from Compaq.

Quoted 4 lines
Quoted 1 line
    Wrong way. ;-))

Eh? Wrong way how? I suppose I'm missing something about contributing kernel macros for PCI IDs?

These chips are not PCI devices.

Quoted 2 lines

Ah, so that's where you've been. ;) How's the upgrade going so far?

Thanks, smoothly. Sensors are working again. ;-))

Regards,
Oleg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i2c-elektor.patch
Type: application/octet-stream
Size: 1064 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030725/de5ae5a1/i2c-elektor.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i2c-tsunami.c
Type: application/octet-stream
Size: 3923 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030725/de5ae5a1/i2c-tsunami.obj

#4 lore raw
In reply to Kelledin
Quoted 4 lines
Quoted 2 lines

Also, the i2c-tsunami driver itself looks...well...unmaintained. Does anyone maintain it now?

Seems so, yes. Oleg?

    Probably. ;-))
Quoted 7 lines
Quoted 4 lines

If it's been abandoned, I can
happily take over maintenance, assuming someone can loan or donate enough to build a sufficiently-working Typhoon/Tsunami motherboard setup.

We don't have such hardware, or we probably would maintain the driver by ourselves.

Yes, I will do the testing if you make necessary changes to work it with
the new "PCI" style code. I've no idea for now... But remember tsunami it's not a PCI device, it's something like an ISA memory mapped device.

Regards,
Oleg.

author
#5 lore raw
In reply to Kelledin
Quoted 7 lines · you
Quoted 4 lines

i2c-tsunami does not compile, and its fix is more than just a one-liner. It requires the <linux/slab.h> include, plus the <linux/pci.h> include, plus some changes in static struct initialization to accomodate recent gcc versions.

Hm... And that's the problem exactly? I'm currently not
suscribed to the list, but will try to recompile this code...

Here's a snippet of my current patch to give you an idea:

static struct i2c_algo_bit_data tsunami_i2c_bit_data = {
-

-       bit_tsunami_setsda,
-       bit_tsunami_setscl,
-       bit_tsunami_getsda,
-       bit_tsunami_getscl,
-       10, 10, HZ/2    /* delays/timeout */
+       .setsda         = bit_tsunami_setsda,
+       .setscl         = bit_tsunami_setscl,
+       .getsda         = bit_tsunami_getsda,
+       .getscl         = bit_tsunami_getscl,
+       .udelay         = 10,
+       .mdelay         = 10,
+       .timeout        = HZ/2,

};

Apparently gcc-3.2.3/alpha doesn't grok the original method of static initialization. It choked on it badly until I switched it. gcc-2.95.3/x86 seems to like either way just fine.

Maybe the C standard has changed, or maybe gcc3 is just being a fruitcake. But as the other static structs use a different form of initialization, I decided to accomodate gcc3 and introduce proper consistency in one fell swoop.

(Other lm_sensors drivers have small problems compiling on alpha, mostly one-liner fixes that I've been able to handle on my end. I was planning to finish it out and send the full patch upstream, but I hit a stumbling block on i2c-tsunami.)

Quoted 11 lines
Quoted 10 lines

Its biggest problem, though, is that it's missing a tsunami_ids struct (list of PCI IDs), and this is REALLY a problem. I have no clue what the Tsunami/Typhoon (2127x) PCI IDs are. I know that they're the core logic controller chips on such motherboards as the DP264 and the UP2000 series. I also looked in the <linux/pci_ids.h> header for 2.4.2[01], and the closest macro I could find for this PCI device ID is
PCI_DEVICE_ID_DEC_21285. I'm fairly certain that won't do at all.

Quoted 10 lines

Tsunami/Typhoon chips are not PCI devices. They are core
logic which is transparent to PCI stuff. The only visible parts on the UP2000/DS20 boards is the "real" hardware stuff:
-----------
00:05.0 ISA bridge: Contaq Microsystems 82c693 00:05.1 IDE interface: Contaq Microsystems 82c693 00:05.2 IDE interface: Contaq Microsystems 82c693 00:05.3 USB Controller: Contaq Microsystems 82c693 00:06.0 SCSI storage controller: Adaptec AHA-2940U2/W / 7890 (rev 01) ----------

Hmmm...well, part of the tsunami_driver struct requires a PCI ID table (tsunami_ids). I'm not sure what's supposed to go in that table?

Could it be that someone tried to port the driver to the new API, half-finished it, and left it for dead? lm_sensors-2.7.0 makes no mention of the tsunami_driver struct or the tsunami_ids table. Maybe that little struct arrangement isn't supposed to be there?

Quoted 10 lines
Quoted 5 lines

CVS, as of 20030724, is no better. Last entry for this driver was apparently back in January.

This is especially annoying, as the Tsunami driver is the primary driver that makes lm_sensors useful at all on Alpha.

Just FYI. Tsunami i2c bus provides an access to a SPD
chips only. Other stuff (such as lm75, adm9240) are accessed via i2c-elektor module. So, in fact UP2000 has to different i2c buses.

Ah, I never knew about that. Good info to have, thanks.

What Alpha motherboards support sensors like that, btw?

Quoted 9 lines
Quoted 7 lines

Unfortunately, I have no such motherboard with this chipset.
I'd like to make the driver work anyways. Can people with
Typhoon/Tsunami motherboards please volunteer the PCI IDs for these chips? I'd prefer to merge them with the <linux/pci_ids.h> file, then add some #ifdefs to i2c-tsunami.c to make sure the PCI ID macros get defined even on older kernel versions.

    Wrong way. ;-))

Eh? Wrong way how? I suppose I'm missing something about contributing kernel macros for PCI IDs?

(Wouldn't surprise me if I was. I'm not all _that_ much of a kernel hacker.)

Quoted 9 lines
Quoted 5 lines

Also, the i2c-tsunami driver itself looks...well...unmaintained. Does anyone maintain it now? If it's been abandoned, I can happily take over maintenance, assuming someone can loan or donate enough to build a sufficiently-working Typhoon/Tsunami motherboard setup.

Yes. It's unmaintained due to the fact we have used
kernels 2.2.x on our site, but now we are moving to 2.4 series.

Ah, so that's where you've been. ;) How's the upgrade going so far?

Signature · 3 lines
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"
#6 lore raw
In reply to Kelledin
Quoted 8 lines · you
Quoted 4 lines

OK, I'd prefer a slightly different fix. We don't include <asm/param.h> in any of our drivers. It seems we include <linux/slab.h> instead, so I think we should do the same for this one. Could you try and confirm it works for you?

Yes, it works with <linux/slab.h> instead of <asm/param.h>.

I changed my mind. If it only needs asm/param.h, why would we overload it with things it doesn't need? I'll include <asm/param.h> with a comment that says it there is for HZ.

Quoted 4 lines
Quoted 2 lines

The i2c-philips-par driver seems to miss it too. Were you successful building it?

Oddly, yes. i2c-philips-par does not complain, at least.

I checked this, and it happens that this module includes <linux/parport.h>, which itself includes <linux/proc_fs.h>, which in turn includes <linux/slab.h> (which itself includes <asm/param.h> as we now know). I will explicitely add an include <linux/slab.h> since I think the module needs it (it uses kmalloc/kfree).

Thanks for reporting!

Quoted 5 lines

Well, every one of those warnings is a possible segfault on 64-bit platforms, because the upper 32 bits of a pointer get lost. Actually, in this case (kernel-land code), it might be rather worse--the driver could conceivably end up playing with the wrong memory region, and do so with impunity.

I don't know about your specific warnings, so I just can't tell. If the system you see them on is both Alpha and 64-bit, this makes two big differences with what i2c and lm_sensors is usually used on, so no wonder it doesn't work out of the box. I don't think any of the developers here have an Alpha system. We must have one IA-64 system but we don't spend too much time testing on it.

This is far better if the person who has the warnings can take a look and fix them. We can hardly fix warnings we don't even see.

Quoted 7 lines

i2c-tsunami does not compile, and its fix is more than just a one-liner. It requires the <linux/slab.h> include, plus the <linux/pci.h> include, plus some changes in static struct initialization to accomodate recent gcc versions. (...)
CVS, as of 20030724, is no better. Last entry for this driver was apparently back in January.

You're right, and even these were bulk changes that are not specific to that driver. The driver must not havee been tested for months if not years (due to the lack of hardware on our side).

Quoted 5 lines

This is especially annoying, as the Tsunami driver is the primary driver that makes lm_sensors useful at all on Alpha.

Unfortunately, I have no such motherboard with this chipset. I'd like to make the driver work anyways.

My experience is that this won't work. Too hard to fix a driver unless you have someone that can test it and really wants it to work. Fixing things just to make them work almost never led me anywhere.

Quoted 2 lines

Also, the i2c-tsunami driver itself looks...well...unmaintained. Does anyone maintain it now?

Seems so, yes. Oleg?

Quoted 4 lines

If it's been abandoned, I can
happily take over maintenance, assuming someone can loan or donate enough to build a sufficiently-working Typhoon/Tsunami motherboard setup.

We don't have such hardware, or we probably would maintain the driver by ourselves.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#7 lore raw
In reply to Kelledin
Quoted 19 lines

Here's a snippet of my current patch to give you an idea:

static struct i2c_algo_bit_data tsunami_i2c_bit_data = {

(quoted diff) +7 -6
-
-       bit_tsunami_setsda,
-       bit_tsunami_setscl,
-       bit_tsunami_getsda,
-       bit_tsunami_getscl,
-       10, 10, HZ/2    /* delays/timeout */
+       .setsda         = bit_tsunami_setsda,
+       .setscl         = bit_tsunami_setscl,
+       .getsda         = bit_tsunami_getsda,
+       .getscl         = bit_tsunami_getscl,
+       .udelay         = 10,
+       .mdelay         = 10,
+       .timeout        = HZ/2,
 };
Quoted 8 lines

Apparently gcc-3.2.3/alpha doesn't grok the original method of static initialization. It choked on it badly until I switched it. gcc-2.95.3/x86 seems to like either way just fine.

Maybe the C standard has changed, or maybe gcc3 is just being a fruitcake. But as the other static structs use a different form of initialization, I decided to accomodate gcc3 and introduce proper consistency in one fell swoop.

The new way complies with C99 (yes, the standard has evolved, if not changed) and we try to make all our drivers comply with that. This makes struct changes less painful (although it's still tough). Everything in i2c should be that way now, but we haven't finished cleaning lm_sensors yet.

Quoted 9 lines

Hmmm...well, part of the tsunami_driver struct requires a PCI ID table (tsunami_ids). I'm not sure what's supposed to go in that table?

Could it be that someone tried to port the driver to the new API, half-finished it, and left it for dead? lm_sensors-2.7.0 makes no mention of the tsunami_driver struct or the tsunami_ids table. Maybe that little struct arrangement isn't supposed to be there?

This is really possible (not to say probable). As said in an earlier e-mail, the last changes on this driver back in January 2003 were part of a bulk change that affected almost all of our drivers. I remember there were many thread on this list about PCI drivers needing updates. I guess this one has been left over in an unstable state (again due to a lack of hardware for testing).

You should go and read this one:
http://archives.andrew.net.au/lm-sensors/msg02718.html

I think this matches what you suspected pretty good. Maybe Mark will be able to tell you what should be done (it's over my own knowledge).

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
author
#8 lore raw
In reply to Kelledin
Quoted 11 lines · you
Quoted 4 lines

Apparently gcc-3.2.3/alpha doesn't grok the original method of static initialization. It choked on it badly until I switched it. gcc-2.95.3/x86 seems to like either way just fine.

Hm... We're using Compaq RH 7.2 Alpha distribution. We've
a choice of weird redhat gcc-2.96 and a kgcc which is a egcs-2.91.66. Both compiling this stuff with no errors. Where you have got a precompiled 3.2.3 for alpha? In my opinion it's better to use kgcc then compiling a kernel on alpha anyway. BTW, redhat guys use gcc-2.96 for the purpose...

Man, HPaq's RH 7.2 Alpha distribution is _ancient_ in tech timelines. ;) RedHat basically discontinued support for the Alpha and passed the buck on to HPaq (causing redhat-axp users much distress, I might add). HPaq's barely even making a token effort to maintain it.

I personally use a derivative of LinuxFromScratch
(http://www.linuxfromscratch.org/). IIRC Debian unstable with a precompiled gcc-3.x, but Debian 3.0 is still using gcc-2.95.4.

As for which compiler to use, gcc-3.2.x is pretty widely regarded as the best compiler for Linux 2.4 on Alpha, even while 2.95.x is preferred for compiling kernels on x86. 2.95.3 has a tendency to ICE when compiling SMP kernels on Alpha. 2.96 is...well...just plain unofficial and dirty in a RedHat hacked-up fashion. egcs is just plain old, and the kernel developers don't bother catering to egcs anymore.

Quoted 6 lines
Quoted 4 lines

Maybe the C standard has changed, or maybe gcc3 is just being a fruitcake. But as the other static structs use a different form of initialization, I decided to accomodate gcc3 and introduce proper consistency in one fell swoop.

Sounds amazing. ;-))

/me morphs into SuperCoder, takes flight, collides with three birds, and promptly trips over a skyscraper. Ouch.

Man, I think those birds had the right-of-way, too. ;)

Quoted 10 lines
Quoted 9 lines

Hmmm...well, part of the tsunami_driver struct requires a PCI ID table (tsunami_ids). I'm not sure what's supposed to go in that table?

Could it be that someone tried to port the driver to the new API, half-finished it, and left it for dead? lm_sensors-2.7.0 makes no mention of the tsunami_driver struct or the tsunami_ids table. Maybe that little struct arrangement isn't supposed to be there?

Quoted 6 lines

If you mean these things

.id_table = tsunami_ids,

then I don't who is doing that... I've attached
"reference" version of the driver to this mail.

Cool...I'll see what I can do with that.

Quoted 3 lines

I've attached i2c-elektor.patch for proper readb/writeb
support in newest kernel. Please incorporate it with your Alpha fixes.

Will do, thanks.

Quoted 7 lines
Quoted 1 line

What Alpha motherboards support sensors like that, btw?

Tsunami chips are used on most low-end Alpha 21264
systems, both from Compaq and Samsung (former Alpha Processor Inc.) systems. PCF8584 (elektor) chips are used on Samsung UP2000, UP2000+ boards and similar systems (I do not remember exactly) from Compaq.

Hmmm...perhaps PC164LX? Maybe I'll try later.

Oh, Jean...as far as the gcc warnings go on i2c, I tracked them down and decided they're harmless. Just some devs took the "void *data" provided for i2c drivers to maintain private info, and used the pointer itself to store a single byte. Kind of a hack, but tolerable.

Signature · 3 lines
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"
#9 lore raw
In reply to Kelledin
Quoted 3 lines

I've attached i2c-elektor.patch for proper readb/writeb support in
newest kernel. Please incorporate it with your Alpha fixes.

Is "newest kernel" to be understood as 2.4.22 or 2.6.0-pre1? (Just to know if we have to commit your patch to i2c CVS or only Greg on his side.)

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
author
#10 lore raw
In reply to Kelledin

Ok, final patchsets.

i2c-alpha.patch just includes Oleg's i2c-elektor fixes (the i2c-velleman fix has already made it to CVS).

lm_sensors-alpha.patch includes various one-line fixes to drivers (mostly missing headers). Most of these drivers (like i2c-i810, i2c-amd8111, i2c-nforce2) are currently useless on Alpha, but may one day be useful (remember the AMD Irongate northbridge?) Besides, if we're going to leave them in the standard build vector, we should at least have them not break the build.

i2c-tsunami... well... the file I got from Oleg is the same as what's already in CVS. I did some minor fixes (the struct initialization change and a few added includes), but I lack the knowledge/hardware to get it working.

Since i2c-tsunami just reads an SPD, I say let Oleg get to it when he gets to it. I don't think very many people will be broken-hearted over not being able to read their DIMM clock or some other such thing. ;)

For now, i2c-tsunami build targets are commented out in kernel/busses/Module.mk. They should be re-enabled when the driver works again.

Signature · 17 lines
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i2c-alpha.patch
Type: text/x-diff
Size: 1187 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030726/9e3a3a14/i2c-alpha.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lm_sensors-alpha.patch
Type: text/x-diff
Size: 4192 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030726/9e3a3a14/lm_sensors-alpha.bin
#11 lore raw
In reply to Kelledin
Quoted 3 lines

i2c-alpha.patch just includes Oleg's i2c-elektor fixes (the i2c-velleman fix has already made it to CVS).

I need Oleg's confirmation that this apply to Linux 2.4 as well as 2.6. (An explanation of why the change is needed would be welcome too).

Quoted 6 lines

lm_sensors-alpha.patch includes various one-line fixes to drivers (mostly missing headers). Most of these drivers (like i2c-i810, i2c-amd8111, i2c-nforce2) are currently useless on Alpha, but may one day be useful (remember the AMD Irongate northbridge?) Besides, if we're going to leave them in the standard build vector, we should at least have them not break the build.

I agree for all fixes but one. You include <linux/slab.h> in i2c-savage4.c while I think <asm/param.h> should be sufficent. Do you confirm?

Quoted 3 lines

For now, i2c-tsunami build targets are commented out in kernel/busses/Module.mk. They should be re-enabled when the driver works again.

I'd by far prefer a real fix... So we won't comment it out for now. We will do so before releasing 2.8.1 if no fix has been proposed at this time. If CVS testers don't notice it fails compiling, why would one want it to be fixed?

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
author
#12 lore raw
In reply to Kelledin
Quoted 6 lines · you
Quoted 2 lines

i2c-alpha.patch just includes Oleg's i2c-elektor fixes (the i2c-velleman fix has already made it to CVS).

I need Oleg's confirmation that this apply to Linux 2.4 as well as 2.6. (An explanation of why the change is needed would be welcome too).

Hmmm...my impression is that it enables the driver to work with newer kernels. Just looking at the asm-${ARCH}/io.h header files from 2.4.20, there are some comments about plans to rip out certain relevant parts in 2.5/2.6, but I don't run 2.5/2.6, so I couldn't tell you exactly what's happened there. You'd have to ask Oleg exactly what the patch fixes.

Quoted 3 lines

I agree for all fixes but one. You include <linux/slab.h> in i2c-savage4.c while I think <asm/param.h> should be sufficent. Do you confirm?

I confirm, ja. I don't know how I missed that, but <asm/param.h> is indeed sufficient.

Quoted 8 lines
Quoted 3 lines

For now, i2c-tsunami build targets are commented out in kernel/busses/Module.mk. They should be re-enabled when the driver works again.

I'd by far prefer a real fix... So we won't comment it out for now. We will do so before releasing 2.8.1 if no fix has been proposed at this time. If CVS testers don't notice it fails compiling, why would one want it to be fixed?

Fair enough. :)

Signature · 3 lines
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"