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]
Message-ID: <6826cdb060609f81c970fc21b2050535f7c5a810.camel@gmail.com>
Date: Thu, 07 Mar 2024 14:06:33 +0100
From: Bean Huo <huobean@...il.com>
To: Avri Altman <avri.altman@....com>, "James E . J . Bottomley"
 <jejb@...ux.vnet.ibm.com>, "Martin K . Petersen"
 <martin.petersen@...cle.com>
Cc: Bart Van Assche <bvanassche@....org>, Bean Huo <beanhuo@...ron.com>, 
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] scsi: ufs: Re-use compose_devman_upiu

On Tue, 2024-03-05 at 23:00 +0200, Avri Altman wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index c9c2b7f99758..a39a2b34ee2b 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -2710,18 +2710,27 @@ static void ufshcd_disable_intr(struct
> ufs_hba *hba, u32 intrs)
>  /**
>   * ufshcd_prepare_req_desc_hdr - Fill UTP Transfer request
> descriptor header according to request
>   * descriptor according to request
> + * @hba: per adapter instance
>   * @lrbp: pointer to local reference block
>   * @upiu_flags: flags required in the header
>   * @cmd_dir: requests data direction
>   * @ehs_length: Total EHS Length (in 32‐bytes units of all Extra
> Header Segments)
> + * @scsi: scsi or device management`
				      ^  '`'

>   */
> -static void ufshcd_prepare_req_desc_hdr(struct ufshcd_lrb *lrbp, u8
> *upiu_flags,
> -                                       enum dma_data_direction
> cmd_dir, int ehs_length)
> +static void
> +ufshcd_prepare_req_desc_hdr(struct ufs_hba *hba, struct ufshcd_lrb
> *lrbp,
> +                           u8 *upiu_flags, enum dma_data_direction
> cmd_dir,
> +                           int ehs_length, bool scsi)

Why not directly pass UTP_CMD_TYPE_SCSI or UTP_CMD_TYPE_DEV_MANAGE
instead of using below ?: logic?


>  {
>         struct utp_transfer_req_desc *req_desc = lrbp-
> >utr_descriptor_ptr;
>         struct request_desc_header *h = &req_desc->header;
>         enum utp_data_direction data_direction;
>  
> +       if (hba->ufs_version <= ufshci_version(1, 1))
> +               lrbp->command_type = scsi ? UTP_CMD_TYPE_SCSI :
> UTP_CMD_TYPE_DEV_MANAGE;



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ