Subject: newbie ethernet driver question
To: None <tech-kern@netbsd.org>
From: Jaromír <jdolecek@netbsd.org>
List: tech-kern
Date: 02/16/2001 00:43:20
Hi,
I'm attempting to write a driver for one of MCA ethernet cards I
have. The current problem I have is that I cannot bus_space_map()
card's memory - the call fails with EAGAIN. Since ~same thing which
I try to do at the moment is done on dev/mca/if_tr_mca.c (which is
reported to work) I wonder where could be an error.
The call is like this:
if ((err = bus_space_map(ma->ma_memt, pbram_addr, IETH_PBUF_SIZE, 0, &memh))) {
printf("err!\n");
return;
}
pbram_addr is address of the card's RAM.
As a matter of fact, I can map the I/O space okay (as well as read it).
One if the things this machine has 'different' is that part of memory
resides on expansion board. Is it necessary to tell the kernel explicitly
about such stuff ?
Is there any obvious reason why the bus_space_map() call would fail ?
There should not be any other devices using same memory address.
"Close" is only vga memory, which goes from 0xa0000 to 0xbffff, the ethernet
card's memory should be on 0xc0000-0xc7fff.
Jaromir
--
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
@@@@ Wanna a real operating system ? Go and get NetBSD, dammit! @@@@