Re: isa_memcpy_fromio

Stephen Clark
2006-07-02T17:00:48Z

Randy.Dunlap wrote:

>On Sun, 02 Jul 2006 11:04:31 +0100 Alan Cox wrote:
>
>
>
>>Ar Sad, 2006-07-01 am 22:43 -0400, ysgrifennodd Stephen Clark:
>>
>>
>>>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
>
>
>
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

--

"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)