public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: shyam_iyer@dell.com
To: linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB (v3)
Date: Mon, 17 Dec 2007 11:17:10 -0500	[thread overview]
Message-ID: <12954112.1197908230928.JavaMail.root@wombat.diezmil.com> (raw)
In-Reply-To: <9170930.1197891872373.JavaMail.root@wombat.diezmil.com>

I found that the patch Robert has provided hasn't gone into 2.6.24-rc5 so maybe it is not working.

At the same time I did apply a small patch to 2.6.24-rc5 that seems to fix the issue.

I feel this could just be added to 2.6.24-rc5 without Robert's patch because of Jeff Garzik's" sata_nv: don't use legacy DMA in ADMA mode (v3)" patch.

It doesn't work without this patch because there is an allocation of memory from  hpriv before the mask can be set.

Please review.

Signed-off-by: Shyam Iyer

--- 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);
-	}
-
 	/* request and iomap NV_MMIO_BAR */
 	rc = pcim_iomap_regions(pdev, 1 << NV_MMIO_BAR, DRV_NAME);
 	if (rc)


--
This message was sent on behalf of shyam_iyer@dell.com at openSubscriber.com
http://www.opensubscriber.com/message/linux-kernel@vger.kernel.org/8211470.html

  reply	other threads:[~2007-12-17 16:17 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 [this message]
2007-12-18  2:50     ` Tejun Heo
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=12954112.1197908230928.JavaMail.root@wombat.diezmil.com \
    --to=shyam_iyer@dell.com \
    --cc=linux-kernel@vger.kernel.org \
    /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