[Patch] Removing legacy method from arm csb337

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Jul 2 07:06:16 UTC 2013


Hi,

I still think its a waste of time to clean this up.

If you really want to get rid of this API, then please remove the 
rtems_irq_connect_data type usage entirely.  This data structure was the reason 
to introduce the new API.

On 07/02/2013 08:34 AM, Vipul Nayyar wrote:
> Hello,
>
> Please suggest modifications if required in arm csb336 and arm csb337 patch
> that I submitted, so that I can move things to a fast track. I really need to
> perfect these first patches, in order to know that the code that I'm updating
> is being done in the right way or not.
>
>
> commit 6130c92254089c412ea9f135503901f898fc0fc1
> Author: Vipul Nayyar <nayyar_vipul at yahoo.com>
> Date:   Tue Jul 2 11:58:09 2013 +0530
>
>      Updated Legacy code in arm csb337
>
> diff --git a/c/src/lib/libbsp/arm/csb337/network/network.c
> b/c/src/lib/libbsp/arm/csb337/network/network.c
> index e31bcc0..3a02073 100644
> --- a/c/src/lib/libbsp/arm/csb337/network/network.c
> +++ b/c/src/lib/libbsp/arm/csb337/network/network.c
> @@ -358,6 +358,7 @@ void at91rm9200_emac_init(void *arg)
>   {
>       at91rm9200_emac_softc_t     *sc = arg;
>       struct ifnet *ifp = &sc->arpcom.ac_if;
> +    rtems_status_code sc = RTEMS_SUCCESSFUL;
>       /*
>        *This is for stuff that only gets done once (at91rm9200_emac_init()
> @@ -382,7 +383,16 @@ void at91rm9200_emac_init(void *arg)
>       AIC_SMR_REG(AIC_SMR_EMAC) = AIC_SMR_PRIOR(EMAC_INT_PRIORITY);
>       /* install the interrupt handler */
> -    BSP_install_rtems_irq_handler(&at91rm9200_emac_isr_data);
> +    sc = rtems_interrupt_handler_install(
> +      at91rm9200_emac_isr_data.name,
> +      "Network",
> +      RTEMS_INTERRUPT_UNIQUE,
> +      at91rm9200_emac_isr_data.hdl,
> +      at91rm9200_emac_isr_data.handle
> +    );
> +    if (sc != RTEMS_SUCCESSFUL) {
> +    return 0;

Please keep the style of the existing file.  So if it uses two spaces for 
indentation, then use this also.

Does the "return 0" makes sense for this function?

Is it good to not call at91rm9200_emac_isr_on() here?

> +    }
>       /* EMAC doesn't support promiscuous, so ignore requests */
>       if (ifp->if_flags & IFF_PROMISC) {
>
>
>
> 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
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list