diff options
-rw-r--r-- | drivers/dma/ioat/dma_v3.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c index 65b912aa1012..804522c1300a 100644 --- a/drivers/dma/ioat/dma_v3.c +++ b/drivers/dma/ioat/dma_v3.c | |||
@@ -1331,20 +1331,28 @@ static int ioat3_reset_hw(struct ioat_chan_common *chan) | |||
1331 | chanerr = readl(chan->reg_base + IOAT_CHANERR_OFFSET); | 1331 | chanerr = readl(chan->reg_base + IOAT_CHANERR_OFFSET); |
1332 | writel(chanerr, chan->reg_base + IOAT_CHANERR_OFFSET); | 1332 | writel(chanerr, chan->reg_base + IOAT_CHANERR_OFFSET); |
1333 | 1333 | ||
1334 | /* clear any pending errors */ | 1334 | if (device->version < IOAT_VER_3_3) { |
1335 | err = pci_read_config_dword(pdev, IOAT_PCI_CHANERR_INT_OFFSET, &chanerr); | 1335 | /* clear any pending errors */ |
1336 | if (err) { | 1336 | err = pci_read_config_dword(pdev, |
1337 | dev_err(&pdev->dev, "channel error register unreachable\n"); | 1337 | IOAT_PCI_CHANERR_INT_OFFSET, &chanerr); |
1338 | return err; | 1338 | if (err) { |
1339 | } | 1339 | dev_err(&pdev->dev, |
1340 | pci_write_config_dword(pdev, IOAT_PCI_CHANERR_INT_OFFSET, chanerr); | 1340 | "channel error register unreachable\n"); |
1341 | return err; | ||
1342 | } | ||
1343 | pci_write_config_dword(pdev, | ||
1344 | IOAT_PCI_CHANERR_INT_OFFSET, chanerr); | ||
1341 | 1345 | ||
1342 | /* Clear DMAUNCERRSTS Cfg-Reg Parity Error status bit | 1346 | /* Clear DMAUNCERRSTS Cfg-Reg Parity Error status bit |
1343 | * (workaround for spurious config parity error after restart) | 1347 | * (workaround for spurious config parity error after restart) |
1344 | */ | 1348 | */ |
1345 | pci_read_config_word(pdev, IOAT_PCI_DEVICE_ID_OFFSET, &dev_id); | 1349 | pci_read_config_word(pdev, IOAT_PCI_DEVICE_ID_OFFSET, &dev_id); |
1346 | if (dev_id == PCI_DEVICE_ID_INTEL_IOAT_TBG0) | 1350 | if (dev_id == PCI_DEVICE_ID_INTEL_IOAT_TBG0) { |
1347 | pci_write_config_dword(pdev, IOAT_PCI_DMAUNCERRSTS_OFFSET, 0x10); | 1351 | pci_write_config_dword(pdev, |
1352 | IOAT_PCI_DMAUNCERRSTS_OFFSET, | ||
1353 | 0x10); | ||
1354 | } | ||
1355 | } | ||
1348 | 1356 | ||
1349 | err = ioat2_reset_sync(chan, msecs_to_jiffies(200)); | 1357 | err = ioat2_reset_sync(chan, msecs_to_jiffies(200)); |
1350 | if (err) { | 1358 | if (err) { |