public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: djbw@fb.com
Cc: vinod.koul@intel.com, linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/5] ioatdma: S1200 platforms ioatdma channel 2 and 3 falsely advertise RAID cap
Date: Wed, 10 Apr 2013 16:44:32 -0700	[thread overview]
Message-ID: <20130410234432.9082.62682.stgit@djiang5-linux2.ch.intel.com> (raw)
In-Reply-To: <20130410234230.9082.89305.stgit@djiang5-linux2.ch.intel.com>

This workaround checks for channel 2&3 and remove RAID cap.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Acked-by: Dan Williams <djbw@fb.com>
---
 drivers/dma/ioat/dma_v3.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index 02afdb5..343320c 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -238,6 +238,18 @@ static bool is_bwd_ioat(struct pci_dev *pdev)
 	}
 }
 
+static bool is_bwd_noraid(struct pci_dev *pdev)
+{
+	switch (pdev->device) {
+	case PCI_DEVICE_ID_INTEL_IOAT_BWD2:
+	case PCI_DEVICE_ID_INTEL_IOAT_BWD3:
+		return true;
+	default:
+		return false;
+	}
+
+}
+
 static void pq16_set_src(struct ioat_raw_descriptor *desc[3],
 			dma_addr_t addr, u32 offset, u8 coef, int idx)
 {
@@ -1813,6 +1825,9 @@ int ioat3_dma_probe(struct ioatdma_device *device, int dca)
 
 	cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET);
 
+	if (is_bwd_noraid(pdev))
+		cap &= ~(IOAT_CAP_XOR | IOAT_CAP_PQ | IOAT_CAP_RAID16SS);
+
 	/* dca is incompatible with raid operations */
 	if (dca_en && (cap & (IOAT_CAP_XOR|IOAT_CAP_PQ)))
 		cap &= ~(IOAT_CAP_XOR|IOAT_CAP_PQ);


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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 23:44 [PATCH v2 0/5] ioatdma: Intel S1200 support patches Dave Jiang
2013-04-10 23:44 ` [PATCH v2 1/5] ioatdma: Removing hw bug workaround for CB3.x .2 and earlier Dave Jiang
2013-04-10 23:44 ` [PATCH v2 2/5] ioatdma: Adding support for 16 src PQ ops and super extended descriptors Dave Jiang
2013-04-10 23:44 ` Dave Jiang [this message]
2013-04-10 23:44 ` [PATCH v2 4/5] ioatdma: Adding write back descriptor error status support for ioatdma 3.3 Dave Jiang
2013-04-10 23:44 ` [PATCH v2 5/5] async_tx: allow generic async_memcpy() not be effected by channel switch Dave Jiang
2013-04-12  1:04 ` [PATCH v2 0/5] ioatdma: Intel S1200 support patches Dan Williams
2013-04-15 17:17 ` Vinod Koul

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=20130410234432.9082.62682.stgit@djiang5-linux2.ch.intel.com \
    --to=dave.jiang@intel.com \
    --cc=djbw@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinod.koul@intel.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