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:   Mon, 20 Sep 2021 18:45:18 -0700
From:   Subbaraman Narayanamurthy <subbaram@...eaurora.org>
To:     Stephen Boyd <swboyd@...omium.org>
Cc:     Stephen Boyd <sboyd@...nel.org>, linux-kernel@...r.kernel.org,
        satya priya <skakit@...eaurora.org>,
        David Collins <quic_collinsd@...cinc.com>
Subject: Re: [PATCH] spmi: pmic-arb: Add sid and address to error messages

On 9/20/21 4:48 PM, Stephen Boyd wrote:
> It's useful to know what particular device/component is having trouble
> accessing the bus. Add the sid and address to error messages here so
> that debugging is a little simpler.
>
> Cc: Subbaraman Narayanamurthy <subbaram@...eaurora.org>
> Cc: satya priya <skakit@...eaurora.org>
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>

Reviewed-by: Subbaraman Narayanamurthy <subbaram@...eaurora.org>

> ---
>  drivers/spmi/spmi-pmic-arb.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
> index bbbd311eda03..e397c2532c8d 100644
> --- a/drivers/spmi/spmi-pmic-arb.c
> +++ b/drivers/spmi/spmi-pmic-arb.c
> @@ -261,20 +261,21 @@ static int pmic_arb_wait_for_done(struct spmi_controller *ctrl,
>  
>  		if (status & PMIC_ARB_STATUS_DONE) {
>  			if (status & PMIC_ARB_STATUS_DENIED) {
> -				dev_err(&ctrl->dev, "%s: transaction denied (0x%x)\n",
> -					__func__, status);
> +				dev_err(&ctrl->dev, "%s: %#x %#x: transaction denied (%#x)\n",
> +					__func__, sid, addr, status);
>  				return -EPERM;
>  			}
>  
>  			if (status & PMIC_ARB_STATUS_FAILURE) {
> -				dev_err(&ctrl->dev, "%s: transaction failed (0x%x)\n",
> -					__func__, status);
> +				dev_err(&ctrl->dev, "%s: %#x %#x: transaction failed (%#x)\n",
> +					__func__, sid, addr, status);
> +				WARN_ON(1);
>  				return -EIO;
>  			}
>  
>  			if (status & PMIC_ARB_STATUS_DROPPED) {
> -				dev_err(&ctrl->dev, "%s: transaction dropped (0x%x)\n",
> -					__func__, status);
> +				dev_err(&ctrl->dev, "%s: %#x %#x: transaction dropped (%#x)\n",
> +					__func__, sid, addr, status);
>  				return -EIO;
>  			}
>  
> @@ -283,8 +284,8 @@ static int pmic_arb_wait_for_done(struct spmi_controller *ctrl,
>  		udelay(1);
>  	}
>  
> -	dev_err(&ctrl->dev, "%s: timeout, status 0x%x\n",
> -		__func__, status);
> +	dev_err(&ctrl->dev, "%s: %#x %#x: timeout, status %#x\n",
> +		__func__, sid, addr, status);
>  	return -ETIMEDOUT;
>  }
>  


-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ