> [EMAIL PROTECTED] writes:
> 
> > From: Chaithrika U S <[EMAIL PROTECTED]>
> >
> > Disables the DM646x EMAC interrupts in the initialization of EMAC
> driver.
> > DM646x EMAC interrupts were not being freed correctly on EMAC stop, this
> has
> > been resolved in EMAC device stop function.
> >
> > Signed-off-by: Chaithrika U S <[EMAIL PROTECTED]>
> 
> Have you validated this change on dm644x also?
Yes, I have validated the change on DM644x too.

> 
> For shared drivers, it will be helpful in the future if the patch
> description also describes which platforms the patch was tested on.
> 
I will take care of this in future.

Chaithrika

> Kevin
> 
> > ---
> >  drivers/net/davinci_emac.c |   12 ++++++++++--
> >  1 files changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> > index 62516c6..3e44232 100644
> > --- a/drivers/net/davinci_emac.c
> > +++ b/drivers/net/davinci_emac.c
> > @@ -2252,7 +2252,7 @@ static int emac_hw_enable(struct emac_priv *priv)
> >    cpu_relax();
> >
> >   /* Disable interrupt & Set pacing for more interrupts initially */
> > - emac_ctrl_write(EMAC_CTRL_EWCTL, 0x0);
> > + emac_int_disable(priv);
> >
> >   /* Set speed and duplex mode */
> >   priv->duplex = EMAC_DUPLEX_UNKNOWN;
> > @@ -2603,6 +2603,9 @@ rollback:
> >   */
> >  static int emac_dev_stop(struct net_device *ndev)
> >  {
> > + struct resource *res;
> > + int i = 0;
> > + int irq_num;
> >   struct emac_priv *priv = netdev_priv(ndev);
> >
> >   /* inform the upper layers. */
> > @@ -2622,7 +2625,12 @@ static int emac_dev_stop(struct net_device *ndev)
> >   emac_write(EMAC_SOFTRESET, 1);
> >
> >   /* Free IRQ */
> > - free_irq(ndev->irq, priv->ndev);
> > + while ((res = platform_get_resource(priv->pdev, IORESOURCE_IRQ, i)))
> {
> > +  for (irq_num = res->start; irq_num <= res->end; irq_num++)
> > +   free_irq(irq_num, priv->ndev);
> > +  i++;
> > + }
> > +
> >   if (netif_msg_drv(priv))
> >    dev_notice(EMAC_DEV, "DaVinci EMAC: %s stopped\n", ndev-
> >name);
> >
> > --
> > 1.5.4.1
> >
> > _______________________________________________
> > Davinci-linux-open-source mailing list
> > [email protected]
> > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

> [EMAIL PROTECTED] writes:
> 
> > From: Chaithrika U S <[EMAIL PROTECTED]>
> >
> > Disables the DM646x EMAC interrupts in the initialization of EMAC
> driver.
> > DM646x EMAC interrupts were not being freed correctly on EMAC stop, this
> has
> > been resolved in EMAC device stop function.
> >
> > Signed-off-by: Chaithrika U S <[EMAIL PROTECTED]>
> 
> Have you validated this change on dm644x also?
Yes, I have tested the change on DM644x too.
> 
> For shared drivers, it will be helpful in the future if the patch
> description also describes which platforms the patch was tested on.
> 
I will take care of this in future.
Chaithrika
> Kevin
> 
> > ---
> >  drivers/net/davinci_emac.c |   12 ++++++++++--
> >  1 files changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> > index 62516c6..3e44232 100644
> > --- a/drivers/net/davinci_emac.c
> > +++ b/drivers/net/davinci_emac.c
> > @@ -2252,7 +2252,7 @@ static int emac_hw_enable(struct emac_priv *priv)
> >    cpu_relax();
> >
> >   /* Disable interrupt & Set pacing for more interrupts initially */
> > - emac_ctrl_write(EMAC_CTRL_EWCTL, 0x0);
> > + emac_int_disable(priv);
> >
> >   /* Set speed and duplex mode */
> >   priv->duplex = EMAC_DUPLEX_UNKNOWN;
> > @@ -2603,6 +2603,9 @@ rollback:
> >   */
> >  static int emac_dev_stop(struct net_device *ndev)
> >  {
> > + struct resource *res;
> > + int i = 0;
> > + int irq_num;
> >   struct emac_priv *priv = netdev_priv(ndev);
> >
> >   /* inform the upper layers. */
> > @@ -2622,7 +2625,12 @@ static int emac_dev_stop(struct net_device *ndev)
> >   emac_write(EMAC_SOFTRESET, 1);
> >
> >   /* Free IRQ */
> > - free_irq(ndev->irq, priv->ndev);
> > + while ((res = platform_get_resource(priv->pdev, IORESOURCE_IRQ, i)))
> {
> > +  for (irq_num = res->start; irq_num <= res->end; irq_num++)
> > +   free_irq(irq_num, priv->ndev);
> > +  i++;
> > + }
> > +
> >   if (netif_msg_drv(priv))
> >    dev_notice(EMAC_DEV, "DaVinci EMAC: %s stopped\n", ndev-
> >name);
> >
> > --
> > 1.5.4.1
> >
> > _______________________________________________
> > Davinci-linux-open-source mailing list
> > [email protected]
> > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to