[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5307646D.4050801@cogentembedded.com>
Date: Fri, 21 Feb 2014 18:36:29 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Shahed Shaikh <shahed.shaikh@...gic.com>, davem@...emloft.net
CC: netdev@...r.kernel.org, Dept-HSGLinuxNICDev@...gic.com,
Sony Chacko <sony.chacko@...gic.com>
Subject: Re: [PATCH net 5/5] qlcnic: reset firmware API lock during driver
load
Hello.
On 21-02-2014 10:23, Shahed Shaikh wrote:
> 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>
> ---
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> index 1222865..61f8893 100644
> --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> @@ -2305,6 +2305,18 @@ void qlcnic_set_drv_version(struct qlcnic_adapter *adapter)
> qlcnic_fw_cmd_set_drv_version(adapter, fw_cmd);
> }
>
> +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);
> +}
> +
> static int
> qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> {
WBR, Sergei
--
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