Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Oct 1997 01:24:30 +0930
From:      Mike Smith <mike@smith.net.au>
To:        "Paul T. Root" <proot@horton.iaces.com>
Cc:        mike@smith.net.au (Mike Smith), mobile@freebsd.org
Subject:   Re: problems with PCMCIA cards 
Message-ID:  <199710021554.BAA00787@word.smith.net.au>
In-Reply-To: Your message of "Thu, 02 Oct 1997 10:41:37 EST." <199710021541.KAA09985@horton.iaces.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> In a previous message, Mike Smith said:
> > > pccard.conf:
> > > 
> > > # Generally available IO ports
> > > io	0x240-0x2e0 0x300-0x360
> > > # Generally available IRQs
> > > irq	10 11
> > ...
> > > # Megahertz CC3288
> > > card "MEGAHERTZ" "CC3288"
> > > 	config	0x23 "sio1" 11
> > 
> > Um, on my XJ4336-CC4336 config index 0x23 looks like this :
> > 
> > Tuple #8, code = 0x1b (Configuration entry), length = 7
> >     000:  23 08 aa 60 e8 02 07
> >         Config index = 0x23
> >         Card decodes 10 address lines, 8 Bit I/O only
> >                 I/O address # 1: block start = 0x2e8 block length = 0x8
> > 
> > But that's not allowed by your 'io' declaration above.  I'd just leave 
> > the whole 0x240-0x360 range open and pick your config indexes carefully.
> 
> Ok. I guess I'm a slow learner. I changed io to be 0x240-0x360 like you
> said (I'd just taken whatever pao had given me). The megahertz card was
> not in the pccard.conf.sample, so I just copied one (XJ2288 I think). 

Fair enough.  Part of the problem with the current pccard stuff is that 
it's just too card-specific. 8(

> So what I want to do is pick an index that has an io address inside 
> the io range in the pccard.conf file. And a free irq, or do I want to
> use irq 3 since that's sio1?

You want to list the free IRQs that you have at the top of the 
pccard.conf file, and then assign one to each device you list in the 
file.  If you're only listing what you have, like I do, then give a 
different IRQ to each device.

It's worth pointing out that PCCARDs just have a single interrupt 
output pin; it's the PCCARD controller chip inside your laptop that 
maps that to an IRQ number.

> Wouldn't I want to use the io range of sio1? That's 0x2f8 isn't it?

That's probably as good as any.  Make sure you have enough sio devices 
configured in your kernel; you'll probably want two, one for the 
onboard port and another free for the modem.

> The errors I get are:
> 
> 
> Oct  2 10:23:45 fievel pccardd[285]: Card "MEGAHERTZ"("CC3288") matched "MEGAHERTZ" ("CC3288")
> Oct  2 10:23:49 fievel pccardd[285]: driver allocations failed for MEGAHERTZ (Invalid argument)
> 
> when I try: config 0x23 "sio1" 3

Yes, IRQ 3 is almost certainly taken by the PCCARD controller chip 
(pcic) - check the output from 'dmesg' to see this.

> Oct  2 10:25:25 fievel pccardd[311]: Card "MEGAHERTZ"("CC3288") matched "MEGAHERTZ" ("CC3288")
> Oct  2 10:25:28 fievel /kernel: Return IRQ=11
> Oct  2 10:25:28 fievel /kernel: stray irq 11
> Oct  2 10:25:28 fievel pccardd[311]: driver allocations failed for MEGAHERTZ (Operations not supported by device)

Alright, we're getting somewhere.  The stray irq 11 implies that 11 may 
be a bad choice for your system.  Check your hardware documentation and 
make sure that 11 isn't used by the onboard sound system, or the PCI 
bus (eg. in my Toshiba IRQ 11 is assigned for internal PCI peripherals).

> Tuple #7, code = 0x1b (Configuration entry), length = 7
>     000:  21 08 aa 60 f8 02 07
> 	Config index = 0x21
> 	Card decodes 10 address lines, 8 Bit I/O only
> 		I/O address # 1: block start = 0x2f8 block length = 0x8

This is probably the best CI to use; it sits on the sio1 address.

As I quoted before, the entry :

card "Megahertz" "XJ4336-CC4336"
        config  0x21 "sio1" 5

works for me.  You might want to try this (make very sure that the 
interupt you nominate in the card spec is listed as available at the 
top of the file...

mike




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710021554.BAA00787>