Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jun 2006 15:36:18 -0700
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        hongz@promisechina.com
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Help:why bus resource shortage?
Message-ID:  <20060629223618.GR82074@funkthat.com>
In-Reply-To: <1150354522$36510$27619252@hongz@promisechina.com>
References:  <1150354522$36510$27619252@hongz@promisechina.com>

next in thread | previous in thread | raw e-mail | index | archive | help
hongz@promisechina.com wrote this message on Thu, Jun 15, 2006 at 14:55 +0800:
> I failed to get the pci bus resource after the driver is loaded (sc->r_mem
> is NULL after bus_alloc_resource_any is called). Is it because bus resources
> have been consumed by other drivers? Or other something happened? Please
> help me on this!

Please provide a verbose boot (boot -v) output of the pci card...

> rid = 0x10;

You really should be using PCIR_BAR macro instead of hard coding it...

> sc->r_mem = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY, &rid,
> RF_ACTIVE);
> 
> if (!sc->r_mem) return ENOMEM;
> 
>  
> 
> The pci resources on our cards:
> 
> shasta0: <Promise FastTrak 4310/579/779 Driver> port 0x2400-0x247f,
> 0x2000-0x20ff mem 0xe9021000-0xe9021fff, 0xe9000000-0xe901ffff irq 17 at
> device 5.0 on pci2

The resources could be in a different order than listed...  Are you
sure the memory resource is in the first bar possition?

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



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