pccard0: Card has no functions! OR PCI memory range allocation problem?

Bengt Ahlgren bengta at sics.se
Wed Mar 9 03:54:20 PST 2005


Warner Losh <imp at bsdimp.com> writes:

> > Now to the bottom line: where is the bug?
> > 
> > 1) In the if_ath driver module which deallocated a PCI memory range
> >    which it didn't allocate (the kernel did at boot).
> > 
> > 2) In the PCI memory allocation/deallocation routines which allowed
> >    the loadable driver to deallocate a PCI memory range that was
> >    allocated at boot.
> > 
> > 3) In cbb/pccard which perhaps shouldn't be allowed to use the memory
> >    range?
> > 
> > 4) Or is the answer that I should not unload drivers for fixed
> >    hardware?
> 
> 5) On kldunload, the resources shouldn't be freed.  Only when then
>    child actually goes away should they be freed.  I think this is the
>    heart of the bug.  Once this is fixed, all the down stream badness
>    should go away.

A little more info from devinfo -u, after boot:

    0xd0100e00-0xd01fffff (root0)
    0xd0200000-0xd020ffff ----
    0xd0210000-0xd02100ff ----
    0xd0210100-0xd021ffff (root0)
    0xd0220000-0xd023ffff (em0)

After loading if_ath:

    0xd0100e00-0xd01fffff (root0)
    0xd0200000-0xd020ffff (ath0)
    0xd0210000-0xd02100ff ----
    0xd0210100-0xd021ffff (root0)
    0xd0220000-0xd023ffff (em0)

After unloading if_ath:

    0xd0100e00-0xd020ffff (root0)
    0xd0210000-0xd02100ff ----
    0xd0210100-0xd021ffff (root0)
    0xd0220000-0xd023ffff (em0)

The ath memory resource was merged to the preceding "root0" resource.
(And after this, no pccard is recognised.)

What does "----" mean in the devinfo printout?

After using devinfo, the system once froze up when I inserted a
pccard.  That never happened before.

Bengt


More information about the freebsd-mobile mailing list