public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: shyam_iyer@dell.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB (v3)
Date: Tue, 18 Dec 2007 11:50:59 +0900	[thread overview]
Message-ID: <47673593.6040104@gmail.com> (raw)
In-Reply-To: <12954112.1197908230928.JavaMail.root@wombat.diezmil.com>

Hello,

shyam_iyer@dell.com wrote:
> --- sata_nv.c.orig	2007-12-17 21:08:12.000000000 +0530
> +++ sata_nv.c	2007-12-17 21:08:25.000000000 +0530
> @@ -2407,6 +2407,12 @@
>  			type = GENERIC;
>  	}
>  
> +	/* set 64bit dma masks, may fail */
> +	if (type == ADMA) {
> +		if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0)
> +			pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
> +	}
> +
>  	ppi[0] = &nv_port_info[type];
>  	rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
>  	if (rc)
> @@ -2418,12 +2424,6 @@
>  	hpriv->type = type;
>  	host->private_data = hpriv;
>  
> -	/* set 64bit dma masks, may fail */
> -	if (type == ADMA) {
> -		if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0)
> -			pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
> -	}
> -

This is weird.  IIRC, the problem is caused by allocating consistent
memory for legacy DMA over 32bit limit.  Your patch moves setting 64bit
DMA mask upward but it doesn't affect anything because
ata_pci_prepare_sff_host() and hpriv allocation are not DMA memory
allocations and thus unaffected by DMA mask.

Robert's last patch seems correct to me.  I have no idea why it doesn't
work for you tho.  Another interesting point is that you are reporting
data corruption instead of time out or HSM violation, which indicates
that the PRD table is accessible but what it contains is incorrect.

I guess it's time to print out some memory addresses.  I'll prep a debug
patch soon.

Thanks.

-- 
tejun

  reply	other threads:[~2007-12-18  2:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-23  2:04 [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB (v3) Robert Hancock
2007-11-23 15:22 ` Mark Lord
2007-11-23 17:30   ` Morrison, Tom
2007-11-23 17:46     ` Mark Lord
2007-11-23 18:47       ` Morrison, Tom
2007-11-23 20:40         ` Mark Lord
2007-11-24  0:13       ` Robert Hancock
2007-11-24  0:20         ` Jeff Garzik
2007-11-24  0:31           ` Robert Hancock
2007-11-24  2:48           ` Mark Lord
2007-11-24  5:12 ` Tejun Heo
2007-12-04 22:17 ` Jeff Garzik
2007-12-05  1:09   ` Robert Hancock
2007-12-28 21:37     ` Robert Hancock
2007-12-08 18:36   ` Robert Hancock
2007-12-17 11:44 ` shyam_iyer
2007-12-17 16:17   ` shyam_iyer
2007-12-18  2:50     ` Tejun Heo [this message]
2007-12-18  3:52     ` Tejun Heo
2007-12-18 10:22       ` Shyam_Iyer
2007-12-18 12:12         ` Shyam_Iyer
2007-12-20 11:15           ` shyam_iyer
2007-12-17 11:47 ` shyam_iyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47673593.6040104@gmail.com \
    --to=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shyam_iyer@dell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox