I/O Problem

I/O Problem

Post by Francisco Obisp » Fri, 17 Mar 2000 04:00:00



Hello.... I have a problem with a driver that Im developing....

When I use outb_p(0x8f,0x300) (Write 0x8f to 0x300) it seems like it
does something but it......

Do I have to reserve this memory space for my card??? do I do this by
calling kmalloc??? How do I tell linux that my ISA card is going to use
0x300????

Thanx

 
 
 

I/O Problem

Post by Thomas Eschenbache » Fri, 17 Mar 2000 04:00:00



> [...]
> When I use outb_p(0x8f,0x300) (Write 0x8f to 0x300) it seems like it
> does something but it......

you are addressing i/o space, not memory!

Quote:> Do I have to reserve this memory space for my card??? do I do this by
> calling kmalloc??? How do I tell linux that my ISA card is going to use
> 0x300????

so you should register your driver that it uses this i/o port range. For
an example, take a look at /usr/src/linux/drivers/rtc.c and search for
"request_region".

It is likely that you want to do something like this in your driver's
init function:

#define PORT 0x300
#define RANGE 8
#define NAME "my_driver"

if (check_region(PORT, RANGE) == -EBUSY) {
        printk(NAME "i/o ports are in use!");
        return -EBUSY;

Quote:}

request_region(PORT, RANGE, NAME);

... and somewhere in the close function:

release_region(PORT, RANGE);

bye,
  Thomas.
--
________________________________________________________________________


 
 
 

1. problems, problems, 37.5 GB, problems, 1024, problems...

I have an IBM 37.5 GB hard disk and I'm trying to duel boot Windows 98 SE
and Linux.  In the oversize disk HOWTO
(http://www.linuxdoc.org/HOWTO/Large-Disk-HOWTO-12.html#ss12.1), it mentions
that a distribution running the 2.2.14 kernel will survive the insane 33.8
GB Linux booting limit.  Does this mean that I can successfully install
RedHat Linux 6.2 (the new RedHat with the Linux 2.2.14 kernel) on hard drive
with partitions like:
--------
|  Windoze  (GBs 1-19)
|            |
|            |
|            |
---------
|     RH 6.2 (20-37.5)
|            |
|            |
|            |
---------

Note:  I can't seem to duel boot the RH 6.1 and Windoze.  I've had many
problems each and every time I try it and I've had to delete all partitions
on my drive and install Windoze using its own CDROM disc and its simple
fdisk.

2. Elvis Mouse is alive

3. Installation problems, problems, problems!

4. Read-Copy Update 2.5.4-pre2

5. PPP stands for Problem Problem Problem

6. Can't Spawn Child Process

7. Problems... problems ... more problems

8. Rebilding kernel in Red Hat 4.2

9. Problems, Problems, Problems

10. Problem problem problem

11. Linux died...problems, problems, problems....

12. Linux Problems Problems Problems ... DNS, HD, X Windows

13. Problems Problems Problems.... DNS, HD, X