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: <1407836262.3141.16.camel@joe-AO725>
Date:	Tue, 12 Aug 2014 02:37:42 -0700
From:	Joe Perches <joe@...ches.com>
To:	Sreekanth Reddy <sreekanth.reddy@...gotech.com>
Cc:	martin.petersen@...cle.com, jejb@...nel.org,
	linux-scsi@...r.kernel.org, JBottomley@...allels.com,
	Sathya.Prakash@...gotech.com, Nagalakshmi.Nandigama@...gotech.com,
	linux-kernel@...r.kernel.org, hch@...radead.org
Subject: Re: [RESEND][PATCH 07/10][SCSI]mpt2sas: Added Reply Descriptor Post
 Queue (RDPQ) Array support

On Tue, 2014-08-12 at 14:54 +0530, Sreekanth Reddy wrote:
> So, the proposal is to allocate memory independently for each
> Reply Queue and pass down all of the addresses to the firmware.
> Then the firmware will just take each address and program the value
> into the correct register.

trivial note:

> diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
[]
> @@ -1179,17 +1184,22 @@ static int
>  _base_config_dma_addressing(struct MPT2SAS_ADAPTER *ioc, struct pci_dev *pdev)
>  {
>  	struct sysinfo s;
> -	char *desc = NULL;
> +	u64 consistent_dma_mask;
> +
> +	if (dma_mask)
> +		consistent_dma_mask = DMA_BIT_MASK(64);
> +	else
> +		consistent_dma_mask = DMA_BIT_MASK(32);
>  
>  	if (sizeof(dma_addr_t) > 4) {
>  		const uint64_t required_mask =
>  		    dma_get_required_mask(&pdev->dev);
>  		if ((required_mask > DMA_BIT_MASK(32)) && !pci_set_dma_mask(pdev,
>  		    DMA_BIT_MASK(64)) && !pci_set_consistent_dma_mask(pdev,
> -		    DMA_BIT_MASK(64))) {
> +		    consistent_dma_mask)) {

This would be easier to read if the embedded functions
within the if were on separate lines like:

		if ((required_mask > DMA_BIT_MASK(32)) &&
		    !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
		    !pci_set_consistent_dma_mask(pdev, consistent_dma_mask)) {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ