ioat2,3: report all uncorrectable errors
authorDan Williams <dan.j.williams@intel.com>
Fri, 20 Nov 2009 00:10:07 +0000 (17:10 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 20 Nov 2009 06:21:03 +0000 (23:21 -0700)
Modify is_ioat_bug() to catch all errors that are uncorrectable, or not
currently handled.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/ioat/dma.h
drivers/dma/ioat/dma_v2.c
drivers/dma/ioat/dma_v3.c

index c14fdfeb7f33f2c6c1d9a540c65f3ee21ebe9840..45edde99648070e8c9a0ca14f214ead551cbfc84 100644 (file)
@@ -297,9 +297,7 @@ static inline bool is_ioat_suspended(unsigned long status)
 /* channel was fatally programmed */
 static inline bool is_ioat_bug(unsigned long err)
 {
-       return !!(err & (IOAT_CHANERR_SRC_ADDR_ERR|IOAT_CHANERR_DEST_ADDR_ERR|
-                        IOAT_CHANERR_NEXT_ADDR_ERR|IOAT_CHANERR_CONTROL_ERR|
-                        IOAT_CHANERR_LENGTH_ERR));
+       return !!err;
 }
 
 static inline void ioat_unmap(struct pci_dev *pdev, dma_addr_t addr, size_t len,
index 96ffab7d37a70e82e882160dde2649487dffd742..8f1f7f05deaadaac6cd428cbef09e35e161ededc 100644 (file)
@@ -279,6 +279,8 @@ void ioat2_timer_event(unsigned long data)
                        u32 chanerr;
 
                        chanerr = readl(chan->reg_base + IOAT_CHANERR_OFFSET);
+                       dev_err(to_dev(chan), "%s: Channel halted (%x)\n",
+                               __func__, chanerr);
                        BUG_ON(is_ioat_bug(chanerr));
                }
 
index fad2e9fba4903a95c74d4367ed05fb84f6b08914..252cf2d3f1dab1cd9662791fb1ebbeac59666dfb 100644 (file)
@@ -378,6 +378,8 @@ static void ioat3_timer_event(unsigned long data)
                        u32 chanerr;
 
                        chanerr = readl(chan->reg_base + IOAT_CHANERR_OFFSET);
+                       dev_err(to_dev(chan), "%s: Channel halted (%x)\n",
+                               __func__, chanerr);
                        BUG_ON(is_ioat_bug(chanerr));
                }