diff options
Diffstat (limited to 'drivers/dma/ioat/init.c')
-rw-r--r-- | drivers/dma/ioat/init.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c index efdee1a69fc4..d406056e8892 100644 --- a/drivers/dma/ioat/init.c +++ b/drivers/dma/ioat/init.c | |||
@@ -690,12 +690,11 @@ static int ioat_alloc_chan_resources(struct dma_chan *c) | |||
690 | /* allocate a completion writeback area */ | 690 | /* allocate a completion writeback area */ |
691 | /* doing 2 32bit writes to mmio since 1 64b write doesn't work */ | 691 | /* doing 2 32bit writes to mmio since 1 64b write doesn't work */ |
692 | ioat_chan->completion = | 692 | ioat_chan->completion = |
693 | dma_pool_alloc(ioat_chan->ioat_dma->completion_pool, | 693 | dma_pool_zalloc(ioat_chan->ioat_dma->completion_pool, |
694 | GFP_KERNEL, &ioat_chan->completion_dma); | 694 | GFP_KERNEL, &ioat_chan->completion_dma); |
695 | if (!ioat_chan->completion) | 695 | if (!ioat_chan->completion) |
696 | return -ENOMEM; | 696 | return -ENOMEM; |
697 | 697 | ||
698 | memset(ioat_chan->completion, 0, sizeof(*ioat_chan->completion)); | ||
699 | writel(((u64)ioat_chan->completion_dma) & 0x00000000FFFFFFFF, | 698 | writel(((u64)ioat_chan->completion_dma) & 0x00000000FFFFFFFF, |
700 | ioat_chan->reg_base + IOAT_CHANCMP_OFFSET_LOW); | 699 | ioat_chan->reg_base + IOAT_CHANCMP_OFFSET_LOW); |
701 | writel(((u64)ioat_chan->completion_dma) >> 32, | 700 | writel(((u64)ioat_chan->completion_dma) >> 32, |
@@ -1074,6 +1073,7 @@ static int ioat3_dma_probe(struct ioatdma_device *ioat_dma, int dca) | |||
1074 | struct ioatdma_chan *ioat_chan; | 1073 | struct ioatdma_chan *ioat_chan; |
1075 | bool is_raid_device = false; | 1074 | bool is_raid_device = false; |
1076 | int err; | 1075 | int err; |
1076 | u16 val16; | ||
1077 | 1077 | ||
1078 | dma = &ioat_dma->dma_dev; | 1078 | dma = &ioat_dma->dma_dev; |
1079 | dma->device_prep_dma_memcpy = ioat_dma_prep_memcpy_lock; | 1079 | dma->device_prep_dma_memcpy = ioat_dma_prep_memcpy_lock; |
@@ -1173,6 +1173,17 @@ static int ioat3_dma_probe(struct ioatdma_device *ioat_dma, int dca) | |||
1173 | if (dca) | 1173 | if (dca) |
1174 | ioat_dma->dca = ioat_dca_init(pdev, ioat_dma->reg_base); | 1174 | ioat_dma->dca = ioat_dca_init(pdev, ioat_dma->reg_base); |
1175 | 1175 | ||
1176 | /* disable relaxed ordering */ | ||
1177 | err = pcie_capability_read_word(pdev, IOAT_DEVCTRL_OFFSET, &val16); | ||
1178 | if (err) | ||
1179 | return err; | ||
1180 | |||
1181 | /* clear relaxed ordering enable */ | ||
1182 | val16 &= ~IOAT_DEVCTRL_ROE; | ||
1183 | err = pcie_capability_write_word(pdev, IOAT_DEVCTRL_OFFSET, val16); | ||
1184 | if (err) | ||
1185 | return err; | ||
1186 | |||
1176 | return 0; | 1187 | return 0; |
1177 | } | 1188 | } |
1178 | 1189 | ||