netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: dan.j.williams@intel.com, linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	Dave Jiang <dave.jiang@intel.com>
Subject: [PATCH 2/3] ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata
Date: Wed, 04 Apr 2012 16:10:41 -0700	[thread overview]
Message-ID: <20120404231041.20605.16201.stgit@djiang5-linux.ch.intel.com> (raw)
In-Reply-To: <20120404230749.20605.7000.stgit@djiang5-linux.ch.intel.com>

Silicon errata where when RAID and legacy descriptors are mixed, the legacy
(memcpy and friends) operation must have alignment of 64 bytes to avoid
hanging. This effects Intel Xeon C55xx, C35xx, E5-2600.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---

 drivers/dma/ioat/dma_v3.c |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index 2dbf32b..c5cc3ba 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -1147,6 +1147,44 @@ static int ioat3_reset_hw(struct ioat_chan_common *chan)
 	return ioat2_reset_sync(chan, msecs_to_jiffies(200));
 }
 
+static bool is_jf_ioat(struct pci_dev *pdev)
+{
+	switch (pdev->device) {
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF0:
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF1:
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF2:
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF3:
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF4:
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF5:
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF6:
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF7:
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF8:
+		case PCI_DEVICE_ID_INTEL_IOAT_JSF9:
+			return true;
+		default:
+			return false;
+	}
+}
+
+static bool is_snb_ioat(struct pci_dev *pdev)
+{
+	switch (pdev->device) {
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB0:
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB1:
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB2:
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB3:
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB4:
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB5:
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB6:
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB7:
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB8:
+		case PCI_DEVICE_ID_INTEL_IOAT_SNB9:
+			return true;
+		default:
+			return false;
+	}
+}
+
 int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
 {
 	struct pci_dev *pdev = device->pdev;
@@ -1167,6 +1205,9 @@ int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
 	dma->device_alloc_chan_resources = ioat2_alloc_chan_resources;
 	dma->device_free_chan_resources = ioat2_free_chan_resources;
 
+	if (is_jf_ioat(pdev) || is_snb_ioat(pdev))
+		dma->copy_align = 6;
+
 	dma_cap_set(DMA_INTERRUPT, dma->cap_mask);
 	dma->device_prep_dma_interrupt = ioat3_prep_interrupt_lock;
 

  parent reply	other threads:[~2012-04-04 23:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-04 23:10 [PATCH 0/3] Series short description Dave Jiang
2012-04-04 23:10 ` [PATCH 1/3] ioat: ring size variables need to be 32bit to avoid overflow Dave Jiang
2012-04-04 23:10 ` Dave Jiang [this message]
2012-04-04 23:10 ` [PATCH 3/3] netdma: adding alignment check for NETDMA ops Dave Jiang
2012-04-05  0:18   ` David Miller

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=20120404231041.20605.16201.stgit@djiang5-linux.ch.intel.com \
    --to=dave.jiang@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).