aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/ioat/dma.c65
1 files changed, 61 insertions, 4 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index 251f8be639c2..49386ce04bf5 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -38,8 +38,54 @@
38 38
39#include "../dmaengine.h" 39#include "../dmaengine.h"
40 40
41static char *chanerr_str[] = {
42 "DMA Transfer Destination Address Error",
43 "Next Descriptor Address Error",
44 "Descriptor Error",
45 "Chan Address Value Error",
46 "CHANCMD Error",
47 "Chipset Uncorrectable Data Integrity Error",
48 "DMA Uncorrectable Data Integrity Error",
49 "Read Data Error",
50 "Write Data Error",
51 "Descriptor Control Error",
52 "Descriptor Transfer Size Error",
53 "Completion Address Error",
54 "Interrupt Configuration Error",
55 "Super extended descriptor Address Error",
56 "Unaffiliated Error",
57 "CRC or XOR P Error",
58 "XOR Q Error",
59 "Descriptor Count Error",
60 "DIF All F detect Error",
61 "Guard Tag verification Error",
62 "Application Tag verification Error",
63 "Reference Tag verification Error",
64 "Bundle Bit Error",
65 "Result DIF All F detect Error",
66 "Result Guard Tag verification Error",
67 "Result Application Tag verification Error",
68 "Result Reference Tag verification Error",
69 NULL
70};
71
41static void ioat_eh(struct ioatdma_chan *ioat_chan); 72static void ioat_eh(struct ioatdma_chan *ioat_chan);
42 73
74static void ioat_print_chanerrs(struct ioatdma_chan *ioat_chan, u32 chanerr)
75{
76 int i;
77
78 for (i = 0; i < 32; i++) {
79 if ((chanerr >> i) & 1) {
80 if (chanerr_str[i]) {
81 dev_err(to_dev(ioat_chan), "Err(%d): %s\n",
82 i, chanerr_str[i]);
83 } else
84 break;
85 }
86 }
87}
88
43/** 89/**
44 * ioat_dma_do_interrupt - handler used for single vector interrupt mode 90 * ioat_dma_do_interrupt - handler used for single vector interrupt mode
45 * @irq: interrupt id 91 * @irq: interrupt id
@@ -774,6 +820,11 @@ static void ioat_eh(struct ioatdma_chan *ioat_chan)
774 if (chanerr ^ err_handled || chanerr == 0) { 820 if (chanerr ^ err_handled || chanerr == 0) {
775 dev_err(to_dev(ioat_chan), "%s: fatal error (%x:%x)\n", 821 dev_err(to_dev(ioat_chan), "%s: fatal error (%x:%x)\n",
776 __func__, chanerr, err_handled); 822 __func__, chanerr, err_handled);
823 dev_err(to_dev(ioat_chan), "Errors handled:\n");
824 ioat_print_chanerrs(ioat_chan, err_handled);
825 dev_err(to_dev(ioat_chan), "Errors not handled:\n");
826 ioat_print_chanerrs(ioat_chan, (chanerr & ~err_handled));
827
777 BUG(); 828 BUG();
778 } 829 }
779 830
@@ -833,6 +884,9 @@ void ioat_timer_event(unsigned long data)
833 chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET); 884 chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET);
834 dev_err(to_dev(ioat_chan), "%s: Channel halted (%x)\n", 885 dev_err(to_dev(ioat_chan), "%s: Channel halted (%x)\n",
835 __func__, chanerr); 886 __func__, chanerr);
887 dev_err(to_dev(ioat_chan), "Errors:\n");
888 ioat_print_chanerrs(ioat_chan, chanerr);
889
836 if (test_bit(IOAT_RUN, &ioat_chan->state)) { 890 if (test_bit(IOAT_RUN, &ioat_chan->state)) {
837 spin_lock_bh(&ioat_chan->cleanup_lock); 891 spin_lock_bh(&ioat_chan->cleanup_lock);
838 spin_lock_bh(&ioat_chan->prep_lock); 892 spin_lock_bh(&ioat_chan->prep_lock);
@@ -875,10 +929,13 @@ void ioat_timer_event(unsigned long data)
875 u32 chanerr; 929 u32 chanerr;
876 930
877 chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET); 931 chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET);
878 dev_warn(to_dev(ioat_chan), "CHANSTS: %#Lx CHANERR: %#x\n", 932 dev_err(to_dev(ioat_chan), "CHANSTS: %#Lx CHANERR: %#x\n",
879 status, chanerr); 933 status, chanerr);
880 dev_warn(to_dev(ioat_chan), "Active descriptors: %d\n", 934 dev_err(to_dev(ioat_chan), "Errors:\n");
881 ioat_ring_active(ioat_chan)); 935 ioat_print_chanerrs(ioat_chan, chanerr);
936
937 dev_dbg(to_dev(ioat_chan), "Active descriptors: %d\n",
938 ioat_ring_active(ioat_chan));
882 939
883 spin_lock_bh(&ioat_chan->prep_lock); 940 spin_lock_bh(&ioat_chan->prep_lock);
884 set_bit(IOAT_CHAN_DOWN, &ioat_chan->state); 941 set_bit(IOAT_CHAN_DOWN, &ioat_chan->state);