PCI lookup issue: 3c905C-TX not found by RTEMS.
Karel Gardas
kgardas at objectsecurity.com
Tue Jan 18 21:00:29 UTC 2005
Till,
yes, while looking for a set of supported NICs, I've also found your
excelent jumbo patch against 4.6.2 (your site seems to be the only one
noting RTEMS in conjuction with Etherexpress and 3c90x :-)). I've tested
exactly this code below, but w/o success. My NIC is still not findable...
So for debugging and reporting to rtems-users I've came back to original
code. Anyway, since I'm not 100% sure (just 99% sure) that I've done all
the steps right (i.e recompile rtems, copy *.a, relink server.exe, copy
server.exe), I will give your code a try again in a few minutes.
Thanks,
Karel
On Tue, 18 Jan 2005, Till Straumann wrote:
> Karel Gardas wrote:
>
>
> I had problems with the BSP_pciFindDevice implementation, too.
> I simply added a wrapper around pcib_find_by_devid()
> (BSP_pciFindDevice API exists for sake of compatibility with
> the PowerPC/shared BSPs):
>
> Try
>
> int
> BSP_pciFindDevice( unsigned short vendorid, unsigned short deviceid,
> int instance, int *pbus, int *pdev, int *pfun )
> {
> int sig, rval;
>
> rval = pcib_find_by_devid(vendorid, deviceid, instance, &sig);
>
> if ( PCIB_ERR_SUCCESS == rval ) {
> *pbus = PCIB_DEVSIG_BUS(sig);
> *pdev = PCIB_DEVSIG_DEV(sig);
> *pfun = PCIB_DEVSIG_FUNC(sig);
> }
>
> return rval;
> }
>
> HTH
> -- Till
>
> > On Tue, 18 Jan 2005 gregory.menke at gsfc.nasa.gov wrote:
> >
> >
> >>Karel Gardas writes:
> >> >
> >> > Any hack I should try?
> >> >
> >>
> >>What devices does the pci find device function discover? The thing to
> >>look for is if the device discovery proceeds onto the pci backplane.
> >
> >
> > With the patch below, I've got this listing for 10b7/9200 device:
> >
> > BSP_pciFindDevice: vendor(10B7)/device(9200)
> >
> > BSP_pciFindDevice: found 0x00497E48 at 0/0/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/1/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/2/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/3/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/4/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/5/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/6/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/7/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/8/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/9/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/10/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/11/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/12/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/13/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/14/0
> > BSP_pciFindDevice: found 0x00497E48 at 0/15/0
> > not found...
> >
> > Any idea?
> >
> > Thanks,
> > Karel
> > --
> > Karel Gardas kgardas at objectsecurity.com
> > ObjectSecurity Ltd. http://www.objectsecurity.com
> >
> > Index: c/src/lib/libbsp/i386/shared/pci/pcibios.c
> > ===================================================================
> > RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/i386/shared/pci/pcibios.c,v
> > retrieving revision 1.3.2.2
> > diff -u -r1.3.2.2 pcibios.c
> > --- c/src/lib/libbsp/i386/shared/pci/pcibios.c 27 Sep 2004 21:49:18 -0000 1.3.2.2
> > +++ c/src/lib/libbsp/i386/shared/pci/pcibios.c 18 Jan 2005 20:15:41 -0000
> > @@ -281,11 +281,13 @@
> > BSP_pciFindDevice( unsigned short vendorid, unsigned short deviceid,
> > int instance, int *pbus, int *pdev, int *pfun )
> > {
> > +#define PCI_DEBUG 1
> > int sig;
> > unsigned int d;
> > unsigned short s;
> > unsigned char bus,dev,fun,hd;
> > -
> > +printk("BSP_pciFindDevice: vendor(%x)/device(%x)\n", vendorid, deviceid);
> > +getchar();
> > for (bus=0; bus<BusCountPCI(); bus++)
> > {
> > for (dev=0; dev<PCI_MAX_DEVICES; dev++)
> > @@ -323,11 +325,13 @@
> > *pbus=bus;
> > *pdev=dev;
> > *pfun=fun;
> > +printk("SUCCESS\n");
> > return 0;
> > }
> > }
> > }
> > }
> > +printk("not found...\n");
> > return -1;
> > }
> >
>
>
>
--
Karel Gardas kgardas at objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
More information about the users
mailing list