Subject: Re: Megahertz XJEM3336 Ethernet/Modem PCMCIA Card on a PowerBook
To: Martin Husemann <martin@duskware.de>
From: Eric Damien Berna <eric@thiel.com>
List: port-macppc
Date: 09/21/2000 11:20:01
Here's the output:
mhzc_alloc_ethernet: iobase = 2800, iosize = 800, maxaddr = 3000, addr = 2800
Does that tell you anything?
I was messing around in this code yesterday, but I don't really know
what I'm doing. The comment from the mhzc_attach function reads in
part:
* Once we have the Modem's address established, we search for
* an address suitable for the Ethernet portion. We do this by
* rounding up to the next 16-byte aligned address where 0x80
* isn't set (the SMC Ethernet chip has a 16-byte address size)
* and attemping to allocate a 16-byte region until we succeed.
I inserted some debug printfs to see what was happening in the
mhzc_alloc_ethernet for loop. It seems to find a good portion of the
address without the 0x80 bit set, but none of those have a
successful pcmcia_io_alloc.
At 12:14 AM +0200 9/21/00, Martin Husemann wrote:
>Hmmm...
>
>> OK, here's the dmesg output listing everything back up the chain from
>> the mhzc lines.
>
>I don't understand the code involved here, but could you try to add the
>attached debug printf and see what that says?
>
>Obviously there is no "iosize" options for PCI-cardbus bridges (and it is
>not supposed to be necessary, I was told).
>
>
>
>Martin
>
>(This is in /usr/src/sys/dev/pcmcia)
>*** mhzc.c.orig Mon Jul 31 11:13:50 2000
>--- mhzc.c Thu Sep 21 00:13:50 2000
>***************
>*** 318,325 ****
>--- 318,328 ----
> * Now round it up so that it starts on a 16-byte boundary.
> */
> addr = roundup(addr, 0x10);
>
>+ printf("mhzc_alloc_ethernet: iobase = %x, iosize = %x,
>maxaddr = %x, addr = %x\n",
>+ sc->sc_pf->sc->iobase, sc->sc_pf->sc->iosize, maxaddr, addr);
>+
> for (; (addr + 0x10) < maxaddr; addr += 0x10) {
> if (addr & 0x80)
> continue;
> if (pcmcia_io_alloc(sc->sc_pf, addr, 0x10, 0x10,
--
Eric Damien Berna
Thiel Design
Phone: 414.271.0775
Email: eric@thiel.com