lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ