FBSD-5.1-RELEASE, Sony Vaio PCG-505TR, Linksys Combo (EC2T) PC-Card or Adaptec SlimSCSI 1460D PC-Card

M. Warner Losh imp at bsdimp.com
Thu Aug 7 11:53:01 PDT 2003


In message: <20030807144421.GE9268 at crawfish.ais.com>
            Jim Knoble <jmknoble+freebsd-mobile at pobox.com> writes:
: Circa 2003-08-06 17:56:50 -0600 dixit M. Warner Losh:
: : In message: <20030805160741.GA9268 at crawfish.ais.com>
: :             Jim Knoble <jmknoble+freebsd-mobile at pobox.com> writes:
: : : The PC-Card and CardBus busses *should* use IRQ 9, and they do.
: : : However, the card itself should not use IRQ 9 ... it needs IRQ 10
: : : (assigned to disabled IrDA) or 11 (free), because it doesn't work with
: : : a shared interrupt.
: : 
: : You *MUST* share the interrupt.  NEWCARD only uses PCI interrupt
: : and you have to share it.  The card *WILL* work with shared
: : interrupts.  The card has *NO*CLUE* it is sharing interrupts.
: 
: {Smiles.}  Lower the volume, please.

I think I was taking too many grumpy pills.  Sorry about that.

: Look, i have no idea who you are.  You could be really stupid, or you
: could be some kind of amazing genius.  You may even know what you're
: talking about here---in the general case.

Well, I've been maintaining FreeBSD PC Card and CardBus code since
about FreeBSD 3.2, give or take a release or two.  I've reimplemented
most of OLDCARD and ported/wrote a lot of NEWCARD, as well as assisted
in dealing with the dozens of odd-ball CardBus bridge setups that
laptop designers seem keen on fobbing off on the world as 

: I'm telling you these cards won't work when they share IRQ 9.

I'm pretty sure you can.  The cards have no way of knowning the
interrupt is being shared.  They just have one ping, #IREQ/READY, that
they use to signal interrupts to their bridge chipset.  The drivers
themselves might have issues, but I'm not aware of any on FreeBSD at
the moment.  I share interrupts all the time, with literally fifty
different PC Cards[*].

: I've had the
: cards and the machine for over 3 years now, i've run them under several
: flavors of Linux, under Windows, under FreeBSD (4.8-RELEASE), and more
: recently Net- and OpenBSD.

FreeBSD 4.x and FreeBSD 5.x use fundamentally different systems for
routing interrupts.  NetBSD and OpenBSD use ISA interrupts for 16-bit
cards.  Linux used to (don't know for sure), as does Windows.  Windows
does it for driver reasons (since not all Windows drivers were smart
enough to grok shared interrupts).

: When they have IRQ 10 (when it's not shared
: with IrDA) or 11, they work.  When they get IRQ 9 (or, with IrDA
: enabled, IRQ 10), they freeze and won't pass any ethernet
: frames---doesn't matter what OS.

It used to be the case, with OLDCARD on FreeBSD < 4.5, that you couldn't
share interrupts.  You had to make them non-shared.  Most BSDs
implement things this way, as did linux for a long time (maybe to this
day, I don't know).  Starting in 4.5 you could use the pci interrupt
path for cardbus bridges and start to share the interrupts.  In fact,
if you used the pci interrupt path, you were forced to share the
interrupts because the cardbus bridge chipset would route the
interrupts for both the card's #IREQ line and the CSC interrupts over
#INTA.  Since #INTA could only be routed to one place, you were forced
to share the interrupt.  4.x allowed one to tell it to route via the
ISA bus, for those cardbus bridges that we groked.

: : Why must they not have a shared interrupt?  I've never seen a card
: : that doesn't work with shared interrupts.
: 
: If you like, i can post a photo of these cards for you.

I'd rather own them. :-)  Seriously, what cards are they?

: : : Under 4.8-RELEASE, [...] pccardd -i 10 -i 11 [...] which will only
: : : let inserted cards get IRQ 10 or 11.  This works fine.
: : 
: : Right.  On 4.x you could use ISA interrupts.  That option is not
: : available with NEWCARD.
: 
: Now we're getting somewhere.  You seem to be saying this:
: 
:   google://FreeBSD%20NEWCARD%20OLDCARD
:   http://www.freebsd.org/doc/en_US.ISO8859-1/articles/5-roadmap/goals.html
: 
:   NEWCARD/OLDCARD: The NEWCARD subsystem was made the default for
:   FreeBSD 5.0. Unfortunately, it contains no support for non-Cardbus
:   bridges and falls victim to interrupt routine problems on some
:   laptops. The classic 16-bit bridge support, OLDCARD, still exists and
:   can be compiled in, but this is highly inconvenient for users of
:   older laptops. If OLDCARD cannot be completely deprecated for
:   RELENG_5, then provisions must be made to allow users to easily
:   install an OLDCARD-enabled kernel. Documentation should be written to
:   help transition users from OLDCARD to NEWCARD and from pccardd(8) to
:   devd(8). The power management and ``dumpcis'' functionality of
:   pccardc(8) needs to be brought forward to work with NEWCARD, along
:   with the ability to load CIS quirk entries. Most of this
:   functionality can be integrated into devd(8) and devctl(4).
: 
: Thanks.  Looks like 5.1 isn't ready for laptops with 16-bit PC-Cards
: yet.

No.  You are confusing '16-bit bridge (aka ISA)' and '16-bit PC Card'
(aka PCMCIA or R2 cards).  The classic 16-bit bridge support is for
ISA bridges only.  Since you are probing and attaching to cbb, you
must have a 32-bit cardbus bridge.  I have a large collection of
16-bit PC Cards that work on a large variety of laptops that are also
in my collection.

Warner

[*] Yes, I have about 100 different PC Card and CardBus cards in my
collection, of which about 50 work.  Please see
http://people.freebsd.org/~imp/CardStatus.html for a partial list of
my collection.


More information about the freebsd-mobile mailing list