[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191016113106.j3fuxpkjwxmanhak@netronome.com>
Date: Wed, 16 Oct 2019 13:31:08 +0200
From: Simon Horman <simon.horman@...ronome.com>
To: Ioana Ciornei <ioana.ciornei@....com>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"jakub.kicinski@...ronome.com" <jakub.kicinski@...ronome.com>,
"andrew@...n.ch" <andrew@...n.ch>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Florin Laurentiu Chiculita <florinlaurentiu.chiculita@....com>
Subject: Re: [PATCH v3 net 1/2] dpaa2-eth: add irq for the dpmac
connect/disconnect event
On Wed, Oct 16, 2019 at 11:10:56AM +0000, Ioana Ciornei wrote:
> > Subject: Re: [PATCH v3 net 1/2] dpaa2-eth: add irq for the dpmac
> > connect/disconnect event
> >
> > On Wed, Oct 16, 2019 at 10:36:22AM +0300, Ioana Ciornei wrote:
> > > From: Florin Chiculita <florinlaurentiu.chiculita@....com>
> > >
> > > Add IRQ for the DPNI endpoint change event, resolving the issue when a
> > > dynamically created DPNI gets a randomly generated hw address when the
> > > endpoint is a DPMAC object.
> > >
> > > Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@....com>
> > > Signed-off-by: Ioana Ciornei <ioana.ciornei@....com>
> > > ---
> > > Changes in v2:
> > > - none
> > > Changes in v3:
> > > - none
> > >
> > > drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 6 +++++-
> > > drivers/net/ethernet/freescale/dpaa2/dpni.h | 5 ++++-
> > > 2 files changed, 9 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> > > b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> > > index 162d7d8fb295..5acd734a216b 100644
> > > --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> > > +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> > > @@ -3306,6 +3306,9 @@ static irqreturn_t dpni_irq0_handler_thread(int
> > irq_num, void *arg)
> > > if (status & DPNI_IRQ_EVENT_LINK_CHANGED)
> > > link_state_update(netdev_priv(net_dev));
> > >
> > > + if (status & DPNI_IRQ_EVENT_ENDPOINT_CHANGED)
> > > + set_mac_addr(netdev_priv(net_dev));
> > > +
> > > return IRQ_HANDLED;
> > > }
> > >
> > > @@ -3331,7 +3334,8 @@ static int setup_irqs(struct fsl_mc_device *ls_dev)
> > > }
> > >
> > > err = dpni_set_irq_mask(ls_dev->mc_io, 0, ls_dev->mc_handle,
> > > - DPNI_IRQ_INDEX,
> > DPNI_IRQ_EVENT_LINK_CHANGED);
> > > + DPNI_IRQ_INDEX,
> > DPNI_IRQ_EVENT_LINK_CHANGED |
> > > + DPNI_IRQ_EVENT_ENDPOINT_CHANGED);
> > > if (err < 0) {
> > > dev_err(&ls_dev->dev, "dpni_set_irq_mask(): %d\n", err);
> > > goto free_irq;
> > > diff --git a/drivers/net/ethernet/freescale/dpaa2/dpni.h
> > > b/drivers/net/ethernet/freescale/dpaa2/dpni.h
> > > index fd583911b6c0..ee0711d06b3a 100644
> > > --- a/drivers/net/ethernet/freescale/dpaa2/dpni.h
> > > +++ b/drivers/net/ethernet/freescale/dpaa2/dpni.h
> > > @@ -133,9 +133,12 @@ int dpni_reset(struct fsl_mc_io *mc_io,
> > > */
> > > #define DPNI_IRQ_INDEX 0
> > > /**
> > > - * IRQ event - indicates a change in link state
> > > + * IRQ events:
> > > + * indicates a change in link state
> > > + * indicates a change in endpoint
> > > */
> > > #define DPNI_IRQ_EVENT_LINK_CHANGED 0x00000001
> > > +#define DPNI_IRQ_EVENT_ENDPOINT_CHANGED 0x00000002
> >
> > Perhaps (as a follow-up?) this is a candidate for using the BIT() macro.
> >
>
> I wouldn't add another change to this patch set (targeting the net) but definitely will change this in net-next.
Thanks, that's fine be me.
Powered by blists - more mailing lists