[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0EA5B226BC5C7B45A71BF612AA8A019E89AE2589@AVMB1.qlogic.org>
Date: Fri, 21 Feb 2014 19:20:05 +0000
From: Sony Chacko <sony.chacko@...gic.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
Shahed Shaikh <shahed.shaikh@...gic.com>,
David Miller <davem@...emloft.net>
CC: netdev <netdev@...r.kernel.org>,
Dept-HSG Linux NIC Dev <Dept-HSGLinuxNICDev@...gic.com>
Subject: RE: [PATCH net 5/5] qlcnic: reset firmware API lock during driver
load
> -----Original Message-----
> From: Sergei Shtylyov [mailto:sergei.shtylyov@...entembedded.com]
> Sent: Friday, February 21, 2014 6:36 AM
> To: Shahed Shaikh; David Miller
> Cc: netdev; Dept-HSG Linux NIC Dev; Sony Chacko
> Subject: Re: [PATCH net 5/5] qlcnic: reset firmware API lock during driver load
>
> > From: Sony Chacko <sony.chacko@...gic.com>
>
> > Firmware is not resetting API lock at initialization, reset the lock
> > at driver load time.
>
> > Signed-off-by: Sony Chacko <sony.chacko@...gic.com>
> > ---
> > +static void qlcnic_reset_api_lock(struct qlcnic_adapter *adapter) {
> > + /* Check lock availability*/
> > + if (qlcnic_api_lock(adapter)) {
> > + /* Lock not available, force release the lock */
> > + qlcnic_api_unlock(adapter);
> > + } else {
> > + /* Lock available, release it before proceeding */
> > + qlcnic_api_unlock(adapter);
> > + }
>
> Isn't it simpler to just do:
>
> qlcnic_api_lock(adapter);
> qlcnic_api_unlock(adapter);
> WBR, Sergei
Thanks, I will rework this patch.
--Sony
--
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