From: Samuel Mendoza-Jonas <sam@mendozajonas.com>
To: Joel Stanley <joel@jms.id.au>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>,
Ravindra S Rao1 <ravindra.s@in.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Ratan K Gupta <ratagupt@in.ibm.com>
Subject: Re: [RFC PATCH 3/3] net/ncsi: Configure VLAN tag filter
Date: Fri, 11 Aug 2017 08:45:25 +1000 [thread overview]
Message-ID: <1502405125.9340.6.camel@mendozajonas.com> (raw)
In-Reply-To: <CACPK8XdNzYRbH2cNMe+u1J3pNXNKZBGp0pRA+O1h7q=QEQ1MjQ@mail.gmail.com>
On Thu, 2017-08-10 at 17:55 +0930, Joel Stanley wrote:
> On Wed, Aug 9, 2017 at 6:24 PM, Samuel Mendoza-Jonas
> <sam@mendozajonas.com> wrote:
> > +static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
> > +{
> > + struct ncsi_dev *nd = &ndp->ndev;
> > + struct ncsi_channel *nc;
> > + struct ncsi_package *np;
> > + unsigned long flags;
> > + unsigned int n = 0;
> > +
> > + NCSI_FOR_EACH_PACKAGE(ndp, np) {
> > + NCSI_FOR_EACH_CHANNEL(np, nc) {
> > + spin_lock_irqsave(&nc->lock, flags);
> > +
> > + /*
> > + * Channels may be busy - mark dirty instead of kicking if
> > + * a) not ACTIVE (configured)
> > + * b) in the channel_queue (to be configured)
> > + * c) it's ndev is in the config state
> > + */
> > + if (nc->state != NCSI_CHANNEL_ACTIVE) {
> > + if ((ndp->ndev.state & 0xff00) == ncsi_dev_state_config ||
> > + !list_empty(&nc->link)) {
> > + netdev_info(nd->dev, "nc %p marked dirty\n", nc);
> > + nc->reconfigure_needed = true;
> > + }
> > + spin_unlock_irqrestore(&nc->lock, flags);
> > + continue;
> > + }
> > +
> > + spin_unlock_irqrestore(&nc->lock, flags);
> > +
> > + ncsi_stop_channel_monitor(nc);
> > + spin_lock_irqsave(&nc->lock, flags);
> > + nc->state = NCSI_CHANNEL_INVISIBLE;
> > + spin_unlock_irqrestore(&nc->lock, flags);
> > +
> > + spin_lock_irqsave(&ndp->lock, flags);
> > + nc->state = NCSI_CHANNEL_INACTIVE;
> > + list_add_tail_rcu(&nc->link, &ndp->channel_queue);
> > + spin_unlock_irqrestore(&ndp->lock, flags);
> > +
> > + spin_unlock_irqrestore(&nc->lock, flags);
>
> Oops, this is unlocking nc->lock a second time.
Oops indeed! Good spot.
>
> > +
> > + netdev_info(nd->dev, "Kicked channel %p\n", nc);
> > + n++;
> > + }
> > + }
prev parent reply other threads:[~2017-08-10 22:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 8:54 [RFC PATCH 0/3] NCSI VLAN Filtering Support Samuel Mendoza-Jonas
2017-08-09 8:54 ` [RFC PATCH 1/3] ftgmac: Include NETIF_F_HW_VLAN_CTAG_FILTER in features Samuel Mendoza-Jonas
2017-08-10 7:49 ` Joel Stanley
2017-08-10 11:30 ` Benjamin Herrenschmidt
2017-08-11 0:05 ` Joel Stanley
2017-08-09 8:54 ` [RFC PATCH 2/3] net/ncsi: Fix several packet definitions Samuel Mendoza-Jonas
2017-08-10 7:03 ` Joel Stanley
2017-08-10 11:28 ` Benjamin Herrenschmidt
2017-08-10 22:39 ` Samuel Mendoza-Jonas
2017-08-11 0:11 ` Joel Stanley
2017-08-09 8:54 ` [RFC PATCH 3/3] net/ncsi: Configure VLAN tag filter Samuel Mendoza-Jonas
2017-08-10 7:49 ` Joel Stanley
2017-08-10 22:42 ` Samuel Mendoza-Jonas
2017-08-10 8:25 ` Joel Stanley
2017-08-10 22:45 ` Samuel Mendoza-Jonas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1502405125.9340.6.camel@mendozajonas.com \
--to=sam@mendozajonas.com \
--cc=benh@kernel.crashing.org \
--cc=joel@jms.id.au \
--cc=openbmc@lists.ozlabs.org \
--cc=ratagupt@in.ibm.com \
--cc=ravindra.s@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.