[GSOC] Help regarding pc386 3c509.c file

Joel Sherrill joel.sherrill at OARcorp.com
Wed Jul 17 17:00:15 UTC 2013


On 7/17/2013 8:58 AM, Vipul Nayyar wrote:
> Hello,
>
> Thanks for the guidance. As in the case of 3c509, there is I believe 
> only one method, that need to be added to bsp.h . But for other files, 
> there are multiple methods for example in ckinit, that are not 
> internally used, but I feel they definitely cannot be removed(like a 
> method to install interrupt handler, etc). So, I hope having multiple 
> prototypes in bsp.h from a single file should not be a problem. Right ?
>
The methods should correspond to those prototyped in
./libcsupport/include/clockdrv.h. The ISR handler
and any nanoseconds since last tick handler can
be static.

You shouldn't change the methods prototyped in clockdrv.h

> Regards
> Vipul Nayyar
>
>
> ------------------------------------------------------------------------
> *From:* Sebastian Huber <sebastian.huber at embedded-brains.de>
> *To:* "rtems-devel at rtems.org" <rtems-devel at rtems.org>
> *Cc:* Vipul Nayyar <nayyar_vipul at yahoo.com>
> *Sent:* Tuesday, 16 July 2013 11:11 PM
> *Subject:* Re: [GSOC] Help regarding pc386 3c509.c file
>
> Hello Vipur,
>
> its good that you ask.  Actually you found a bug in the BSPs using
> 3c509.c.  As Joel already said this rtems_3c509_driver_attach() is the
> main entry point of the network interface driver and can be used by
> applications to use this interface.
>
> So lets have a look which BSP is affected:
>
> ~/git-rtems $ grep -r 3c509.c c | grep 'am:'
> c/src/lib/libbsp/i386/pc386/Makefile.am:3c509_rel_SOURCES = 3c509/3c509.c
>
> So luckily only the pc386 BSP.  You can now add the prototype to
> "c/src/lib/libbsp/i386/pc386/include/bsp.h" line 83.  Just have a look
> at the other network interface definitions.
>
> On 15.07.2013 18:47, Vipul Nayyar wrote:
> > Hello,
> >
> > I'm currently working on i386 pc386 BSP. This problem concerns the 
> 3c509/3c509.c file.
> >
> > After turning rtems_3c509_driver_attach() from global to static, 
> since it's not being used anywhere outside in the tree, I get this 
> warning for unused function. Ideally I should delete it. If I delete 
> it, then I end up deleting all other functions also. But this 
> rtems_3c509_driver_attach() stores references to different handlers & 
> calls them by passing a ifnet structure to if_attach(). I think it's a 
> very important method & I don't think I should delete it.
> >
> > But this function rtems_3c509_driver_attach() is neither called 
> locally , nor globally.
> >
> > If I were to treat it as global function, I think it should be 
> declared in a header file, because declaring a global function locally 
> seems bad.
> > If I were to treat it as static, then I get this warning of unused 
> function during compilation. How should I proceed ?
> >
> > Regards
> > Vipul Nayyar
> >
>
>
> -- 
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone  : +49 89 189 47 41-16
> Fax    : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de 
> <mailto:sebastian.huber at embedded-brains.de>
> PGP    : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
>


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130717/f2231af3/attachment-0001.html>


More information about the devel mailing list