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]
Message-ID: <039d433e9931e4999e4011cebc2844ffacd2ec0c.camel@mediatek.com>
Date: Tue, 22 Apr 2025 12:48:38 +0000
From: Peter Wang (王信友) <peter.wang@...iatek.com>
To: "avri.altman@....com" <avri.altman@....com>, "dh0421.hwang@...sung.com"
	<dh0421.hwang@...sung.com>, "quic_mnaresh@...cinc.com"
	<quic_mnaresh@...cinc.com>, "linux-scsi@...r.kernel.org"
	<linux-scsi@...r.kernel.org>, "bvanassche@....org" <bvanassche@....org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
	"manivannan.sadhasivam@...aro.org" <manivannan.sadhasivam@...aro.org>,
	"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
	"James.Bottomley@...senPartnership.com"
	<James.Bottomley@...senPartnership.com>
CC: "sh043.lee@...sung.com" <sh043.lee@...sung.com>, "wkon.kim@...sung.com"
	<wkon.kim@...sung.com>, "cw9316.lee@...sung.com" <cw9316.lee@...sung.com>,
	"grant.jung@...sung.com" <grant.jung@...sung.com>, "sh8267.baek@...sung.com"
	<sh8267.baek@...sung.com>, "jt77.jang@...sung.com" <jt77.jang@...sung.com>,
	"jangsub.yi@...sung.com" <jangsub.yi@...sung.com>, "junwoo80.lee@...sung.com"
	<junwoo80.lee@...sung.com>
Subject: Re: [PATCH 2/2] scsi: ufs: core: Add a trace function calling when
 uic command error occurs

On Thu, 2025-04-17 at 11:34 +0900, DooHyun Hwang wrote:
> 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> When a uic command error occurs, there is no trace function calling.
> Therefore, trace function calls are added when a uic command error
> happens.
> 
> Signed-off-by: DooHyun Hwang <dh0421.hwang@...sung.com>
> ---
>  drivers/ufs/core/ufshcd.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index ab98acd982b5..baac1ae94efc 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -2534,6 +2534,9 @@ ufshcd_wait_for_uic_cmd(struct ufs_hba *hba,
> struct uic_command *uic_cmd)
>         hba->active_uic_cmd = NULL;
>         spin_unlock_irqrestore(hba->host->host_lock, flags);
> 
> +       if (ret)
> +               ufshcd_add_uic_command_trace(hba, uic_cmd,
> UFS_CMD_ERR);
> +
>         return ret;
>  }
> 
> @@ -4306,6 +4309,8 @@ static int ufshcd_uic_pwr_ctrl(struct ufs_hba
> *hba, struct uic_command *cmd)
>         }
>  out:
>         if (ret) {
> +               ufshcd_add_uic_command_trace(hba, hba-
> >active_uic_cmd,
> +                                            UFS_CMD_ERR);
>                 ufshcd_print_host_state(hba);
>                 ufshcd_print_pwr_info(hba);
>                 ufshcd_print_evt_hist(hba);
> --
> 2.48.1
> 


Hi DooHyun,

Is it possible to receive UFS_CMD_COMP and UFS_CMD_ERR at the same
time? 
Wouldn't it be a bit strange for a command to receive two completions? 
Additionally, should we also add tracing for general SCSI commands 
that receive errors?

Thanks
Peter



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ