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: <c9b0e89069769a093e07ac911f3a9019d1da32c1.camel@wdc.com>
Date:   Sun, 20 May 2018 14:21:51 +0000
From:   Bart Van Assche <Bart.VanAssche@....com>
To:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "jejb@...ux.vnet.ibm.com" <jejb@...ux.vnet.ibm.com>,
        "subhashj@...eaurora.org" <subhashj@...eaurora.org>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "vinholikatti@...il.com" <vinholikatti@...il.com>,
        "shaik.ameer@...sung.com" <shaik.ameer@...sung.com>
Subject: Re: [PATCH V3] scsi: ufs: Add specific callback for setting DMA mask

On Sun, 2018-05-20 at 07:54 +0530, Alim Akhtar wrote:
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index a355d98..9a1374e 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7781,6 +7781,9 @@ EXPORT_SYMBOL_GPL(ufshcd_dealloc_host);
>   */
>  static int ufshcd_set_dma_mask(struct ufs_hba *hba)
>  {
> +	if (hba->vops && hba->vops->set_dma_mask)
> +		return hba->vops->set_dma_mask(hba);
> +
>  	if (hba->capabilities & MASK_64_ADDRESSING_SUPPORT) {
>  		if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
>  			return 0;
> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> index 1332e54..89c6dae 100644
> --- a/drivers/scsi/ufs/ufshcd.h
> +++ b/drivers/scsi/ufs/ufshcd.h
> @@ -297,6 +297,7 @@ struct ufs_pwr_mode_info {
>   * @resume: called during host controller PM callback
>   * @dbg_register_dump: used to dump controller debug information
>   * @phy_initialization: used to initialize phys
> + * @set_dma_mask: used to set variant specific DMA mask
>   */
>  struct ufs_hba_variant_ops {
>  	const char *name;
> @@ -325,6 +326,7 @@ struct ufs_hba_variant_ops {
>  	int     (*resume)(struct ufs_hba *, enum ufs_pm_op);
>  	void	(*dbg_register_dump)(struct ufs_hba *hba);
>  	int	(*phy_initialization)(struct ufs_hba *);
> +	int	(*set_dma_mask)(struct ufs_hba *hba);
>  };

I want to see the code that sets the .set_dma_mask callback function. Where
is it? If it is outside the upstream kernel, please consider to send it
upstream before making changes like this. Adding support for out-of-tree
kernel code is frowned upon big time in the kernel community.

Bart.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ