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] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 25 Aug 2019 22:47:40 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     michael.chan@...adcom.com
Cc:     netdev@...r.kernel.org, vasundhara-v.volam@...adcom.com,
        jiri@...lanox.com, ray.jui@...adcom.com
Subject: Re: [PATCH net-next 04/14] bnxt_en: Handle firmware reset status
 during IF_UP.

From: Michael Chan <michael.chan@...adcom.com>
Date: Sun, 25 Aug 2019 23:54:55 -0400

> @@ -7005,7 +7005,9 @@ static int __bnxt_hwrm_ver_get(struct bnxt *bp, bool silent)
>  
>  	rc = bnxt_hwrm_do_send_msg(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT,
>  				   silent);
> -	return rc;
> +	if (rc)
> +		return -ENODEV;
> +	return 0;
>  }
>  
>  static int bnxt_hwrm_ver_get(struct bnxt *bp)
 ...
> @@ -8528,26 +8533,53 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
>  		req.flags = cpu_to_le32(FUNC_DRV_IF_CHANGE_REQ_FLAGS_UP);
>  	mutex_lock(&bp->hwrm_cmd_lock);
>  	rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
> -	if (!rc && (resp->flags &
> -		    cpu_to_le32(FUNC_DRV_IF_CHANGE_RESP_FLAGS_RESC_CHANGE)))
> -		resc_reinit = true;
> +	if (!rc)
> +		flags = le32_to_cpu(resp->flags);
>  	mutex_unlock(&bp->hwrm_cmd_lock);
> +	if (rc)
> +		return -EIO;

Following up to my other review comments, if _hwrm_send_message() et
al. returned consistently proper error codes instead of sometimes -1,
couldn't you avoid at least some of these 'rc' remappings?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ