linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* isa_memcpy_fromio
@ 2006-07-02  2:43 Stephen Clark
  2006-07-02  3:42 ` isa_memcpy_fromio Randy.Dunlap
  2006-07-02 10:04 ` isa_memcpy_fromio Alan Cox
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Clark @ 2006-07-02  2:43 UTC (permalink / raw)
  To: linux-kernel

Hello,

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

TIA,
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)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: isa_memcpy_fromio
  2006-07-02  2:43 isa_memcpy_fromio Stephen Clark
@ 2006-07-02  3:42 ` Randy.Dunlap
  2006-07-02 10:04 ` isa_memcpy_fromio Alan Cox
  1 sibling, 0 replies; 7+ messages in thread
From: Randy.Dunlap @ 2006-07-02  3:42 UTC (permalink / raw)
  To: Stephen.Clark; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: isa_memcpy_fromio
  2006-07-02  2:43 isa_memcpy_fromio Stephen Clark
  2006-07-02  3:42 ` isa_memcpy_fromio Randy.Dunlap
@ 2006-07-02 10:04 ` Alan Cox
  2006-07-02 16:07   ` isa_memcpy_fromio Randy.Dunlap
  1 sibling, 1 reply; 7+ messages in thread
From: Alan Cox @ 2006-07-02 10:04 UTC (permalink / raw)
  To: Stephen.Clark; +Cc: linux-kernel

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)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: isa_memcpy_fromio
  2006-07-02 10:04 ` isa_memcpy_fromio Alan Cox
@ 2006-07-02 16:07   ` Randy.Dunlap
  2006-07-02 17:00     ` isa_memcpy_fromio Stephen Clark
  0 siblings, 1 reply; 7+ messages in thread
From: Randy.Dunlap @ 2006-07-02 16:07 UTC (permalink / raw)
  To: Alan Cox; +Cc: Stephen.Clark, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: isa_memcpy_fromio
  2006-07-02 16:07   ` isa_memcpy_fromio Randy.Dunlap
@ 2006-07-02 17:00     ` Stephen Clark
  2006-07-02 17:37       ` isa_memcpy_fromio Arjan van de Ven
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Clark @ 2006-07-02 17:00 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Alan Cox, linux-kernel

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)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: isa_memcpy_fromio
  2006-07-02 17:00     ` isa_memcpy_fromio Stephen Clark
@ 2006-07-02 17:37       ` Arjan van de Ven
  2006-07-02 18:13         ` isa_memcpy_fromio Stephen Clark
  0 siblings, 1 reply; 7+ messages in thread
From: Arjan van de Ven @ 2006-07-02 17:37 UTC (permalink / raw)
  To: Stephen.Clark; +Cc: Randy.Dunlap, Alan Cox, linux-kernel


> 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: isa_memcpy_fromio
  2006-07-02 17:37       ` isa_memcpy_fromio Arjan van de Ven
@ 2006-07-02 18:13         ` Stephen Clark
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Clark @ 2006-07-02 18:13 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Randy.Dunlap, Alan Cox, linux-kernel

Arjan van de Ven wrote:

>>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
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>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

-- 

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-07-02 18:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-02  2:43 isa_memcpy_fromio Stephen Clark
2006-07-02  3:42 ` isa_memcpy_fromio Randy.Dunlap
2006-07-02 10:04 ` isa_memcpy_fromio Alan Cox
2006-07-02 16:07   ` isa_memcpy_fromio Randy.Dunlap
2006-07-02 17:00     ` isa_memcpy_fromio Stephen Clark
2006-07-02 17:37       ` isa_memcpy_fromio Arjan van de Ven
2006-07-02 18:13         ` isa_memcpy_fromio Stephen Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).