Skip to contentSkip to conversation

isa_memcpy_fromio

DISCUSSION Stephen Clark 4 participants 7 messages Jul 2, 2006

lore
Share & tools
lore
#0 lore raw

Hello,

what has isa_memcpy_fromio() changed to in kernel 2.6.17 from 2.6.16

TIA,
Steve

Signature · 3 lines
"They that give up essential liberty to obtain temporary safety, deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty decreases."  (Thomas Jefferson)
#1 lore raw
Quoted 3 lines · On Sat, 01 Jul 2006 22:43:47 -0400 Stephen Clark wrote:

Hello,

what has isa_memcpy_fromio() changed to in kernel 2.6.17 from 2.6.16

It was removed since there are no in-kernel users of it.

---
~Randy

#2 lore raw
In reply to Stephen Clark

Ar Sad, 2006-07-01 am 22:43 -0400, ysgrifennodd Stephen Clark:

Quoted 3 lines

Hello,

what has isa_memcpy_fromio() changed to in kernel 2.6.17 from 2.6.16

It was always meant as a transition interface (although it survived incredibly long). All code that uses the ioremap is unaffected: ie

	foo = ioremap(isa_addr, len);
	memcpy_fromio(foo + bar, buf, len2)
#3 lore raw
Quoted 10 lines · On Sun, 02 Jul 2006 11:04:31 +0100 Alan Cox wrote:

Ar Sad, 2006-07-01 am 22:43 -0400, ysgrifennodd Stephen Clark:

Quoted 3 lines

Hello,

what has isa_memcpy_fromio() changed to in kernel 2.6.17 from 2.6.16

It was always meant as a transition interface (although it survived incredibly long). All code that uses the ioremap is unaffected: ie

	foo = ioremap(isa_addr, len);
	memcpy_fromio(foo + bar, buf, len2)

Stephen,
There were only 3 drivers in 2.6.16 that used isa_memcpy_fromio(). You can look at how they were changed for 2.6.17.

drivers/net/hp100.c and hp-plus.c
drivers/scsi/g_NCR5380.c

---
~Randy

#4 lore raw
Quoted 24 lines · Randy.Dunlap
Quoted 5 lines · On Sun, 02 Jul 2006 11:04:31 +0100 Alan Cox wrote:

Ar Sad, 2006-07-01 am 22:43 -0400, ysgrifennodd Stephen Clark:

Quoted 2 lines

Hello,

Quoted 10 lines
Quoted 3 lines

what has isa_memcpy_fromio() changed to in kernel 2.6.17 from 2.6.16

It was always meant as a transition interface (although it survived incredibly long). All code that uses the ioremap is unaffected: ie

	foo = ioremap(isa_addr, len);
	memcpy_fromio(foo + bar, buf, len2)

Stephen,
There were only 3 drivers in 2.6.16 that used isa_memcpy_fromio(). You can look at how they were changed for 2.6.17.

Quoted 8 lines

drivers/net/hp100.c and hp-plus.c
drivers/scsi/g_NCR5380.c

---
~Randy

Thanks to everyone who replied - I am using a module from source forge, on my hp laptop, called omnibook. It allows me to turn off the back light on my n5430. Below is the function that uses isa_memcpy_fromio().

static int __init dmi_iterate(void (*decode)(struct dmi_header *)) {
u8 buf[15];
u32 fp=0xF0000;

#ifdef CONFIG_SIMNOW
/*
* Skip on x86/64 with simnow. Will eventually go away
* If you see this ifdef in 2.6pre mail me !
*/
return -1;
#endif

   while( fp < 0xFFFFF)
   {
       isa_memcpy_fromio(buf, fp, 15);
       if(memcmp(buf, "_DMI_", 5)==0 && dmi_checksum(buf))
       {
           u16 num=buf[13]<<8|buf[12];
           u16 len=buf[7]<<8|buf[6];
           u32 base=buf[11]<<24|buf[10]<<16|buf[9]<<8|buf[8];
           if(dmi_table(base,len,num,decode)==0)
               return 0;
       }
       fp+=16;

}
return -1;
}

Would someone recommend how this should be changed?

Thanks,
Steve

Signature · 3 lines
"They that give up essential liberty to obtain temporary safety, deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty decreases."  (Thomas Jefferson)
#5 lore raw
Quoted 3 lines

Would someone recommend how this should be changed?

Hi,

the kernel already has a full DMI decoder, this module appears to just try to duplicate it (at least judging on the snippet you pasted). It'd be a lot better if the module would just use the existing DMI layer... If it did that then it doesn't need isa_memcpy_fromio() *at all*...

see the drivers/firmware/dmi_scan.c file for the linux DMI layer code.

Greetings,
Arjan van de Ven

#6 lore raw
Quoted 14 lines · Arjan van de Ven
Quoted 4 lines

Would someone recommend how this should be changed?

Hi,

the kernel already has a full DMI decoder, this module appears to just try to duplicate it (at least judging on the snippet you pasted). It'd be a lot better if the module would just use the existing DMI layer... If it did that then it doesn't need isa_memcpy_fromio() *at all*...

see the drivers/firmware/dmi_scan.c file for the linux DMI layer code.

Quoted 11 lines

Greetings,
Arjan van de Ven

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Hi,

Your right - I didn't even look at the beginning of the module - since I was just compiling it after upgrading to 2.6.17-1.2139_FC5.

From the beginning of the file:
/*
* dmi.c -- to get DMI information
*
* This code originally came from file arch/i386/kernel/dmi_scan.c from
* Linux kernel version 2.4.18
*

Thanks,
Steve

Signature · 3 lines
"They that give up essential liberty to obtain temporary safety, deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty decreases."  (Thomas Jefferson)