[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <979A8436335E3744ADCD3A9F2A2B68A52AF23FBC@SJEXCHMB10.corp.ad.broadcom.com>
Date: Wed, 8 Jan 2014 05:41:48 +0000
From: Yuval Mintz <yuvalmin@...adcom.com>
To: David Miller <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Dmitry Kravkov <dmitry@...adcom.com>,
Ariel Elior <ariele@...adcom.com>
Subject: RE: [PATCH net] bnx2x: prevent WARN during driver unload
>
> > + fp->state &= BNX2X_FP_STATE_DISABLED;
> ...
> > + fp->state &= BNX2X_FP_STATE_DISABLED;
>
> Surely you mean "&= ~BNX2X_FP_STATE_DISABLED" here?
Thought the comment above the code was sufficient to show
this is intentional.
The BNX2X_FP_STATE_DISABLED will cause BNX@...P_LOCKED to
Be true. The bnx2x_fp_ll_disable() works by setting this bit even
when BNX2X_FP_OWNED is set; while other flows release the lock
the will clear the bit indications except for the disabled indication,
so that no other flow could take the lock after it was disabled,
and the loop of bnx2x_fp_ll_disable() calls will eventually return true.
Thanks,
Yuval
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists