diff options
author | Vinod Koul <vkoul@kernel.org> | 2018-10-24 04:15:59 -0400 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-10-24 04:15:59 -0400 |
commit | b29cf44398a93ae6ea9122f9b722faad0d280981 (patch) | |
tree | 234749820bd29bc3aaf7bc50c9862154ac896bbe | |
parent | 9b01029dc093262c6ad7fde6940916f154168496 (diff) | |
parent | f4d34aa8c887a8a2d23ef546da0efa10e3f77241 (diff) |
Merge branch 'topic/intel' into for-linus
-rw-r--r-- | drivers/dma/idma64.c | 5 | ||||
-rw-r--r-- | drivers/dma/ioat/init.c | 16 |
2 files changed, 13 insertions, 8 deletions
diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c index 40dc5d2ddf3d..0baf9797cc09 100644 --- a/drivers/dma/idma64.c +++ b/drivers/dma/idma64.c | |||
@@ -142,9 +142,8 @@ static void idma64_chan_irq(struct idma64 *idma64, unsigned short c, | |||
142 | { | 142 | { |
143 | struct idma64_chan *idma64c = &idma64->chan[c]; | 143 | struct idma64_chan *idma64c = &idma64->chan[c]; |
144 | struct idma64_desc *desc; | 144 | struct idma64_desc *desc; |
145 | unsigned long flags; | ||
146 | 145 | ||
147 | spin_lock_irqsave(&idma64c->vchan.lock, flags); | 146 | spin_lock(&idma64c->vchan.lock); |
148 | desc = idma64c->desc; | 147 | desc = idma64c->desc; |
149 | if (desc) { | 148 | if (desc) { |
150 | if (status_err & (1 << c)) { | 149 | if (status_err & (1 << c)) { |
@@ -161,7 +160,7 @@ static void idma64_chan_irq(struct idma64 *idma64, unsigned short c, | |||
161 | if (idma64c->desc == NULL || desc->status == DMA_ERROR) | 160 | if (idma64c->desc == NULL || desc->status == DMA_ERROR) |
162 | idma64_stop_transfer(idma64c); | 161 | idma64_stop_transfer(idma64c); |
163 | } | 162 | } |
164 | spin_unlock_irqrestore(&idma64c->vchan.lock, flags); | 163 | spin_unlock(&idma64c->vchan.lock); |
165 | } | 164 | } |
166 | 165 | ||
167 | static irqreturn_t idma64_irq(int irq, void *dev) | 166 | static irqreturn_t idma64_irq(int irq, void *dev) |
diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c index 4fa4c06c9edb..0fec3c554fe3 100644 --- a/drivers/dma/ioat/init.c +++ b/drivers/dma/ioat/init.c | |||
@@ -129,7 +129,7 @@ static void | |||
129 | ioat_init_channel(struct ioatdma_device *ioat_dma, | 129 | ioat_init_channel(struct ioatdma_device *ioat_dma, |
130 | struct ioatdma_chan *ioat_chan, int idx); | 130 | struct ioatdma_chan *ioat_chan, int idx); |
131 | static void ioat_intr_quirk(struct ioatdma_device *ioat_dma); | 131 | static void ioat_intr_quirk(struct ioatdma_device *ioat_dma); |
132 | static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma); | 132 | static void ioat_enumerate_channels(struct ioatdma_device *ioat_dma); |
133 | static int ioat3_dma_self_test(struct ioatdma_device *ioat_dma); | 133 | static int ioat3_dma_self_test(struct ioatdma_device *ioat_dma); |
134 | 134 | ||
135 | static int ioat_dca_enabled = 1; | 135 | static int ioat_dca_enabled = 1; |
@@ -575,7 +575,7 @@ static void ioat_dma_remove(struct ioatdma_device *ioat_dma) | |||
575 | * ioat_enumerate_channels - find and initialize the device's channels | 575 | * ioat_enumerate_channels - find and initialize the device's channels |
576 | * @ioat_dma: the ioat dma device to be enumerated | 576 | * @ioat_dma: the ioat dma device to be enumerated |
577 | */ | 577 | */ |
578 | static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma) | 578 | static void ioat_enumerate_channels(struct ioatdma_device *ioat_dma) |
579 | { | 579 | { |
580 | struct ioatdma_chan *ioat_chan; | 580 | struct ioatdma_chan *ioat_chan; |
581 | struct device *dev = &ioat_dma->pdev->dev; | 581 | struct device *dev = &ioat_dma->pdev->dev; |
@@ -594,7 +594,7 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma) | |||
594 | xfercap_log = readb(ioat_dma->reg_base + IOAT_XFERCAP_OFFSET); | 594 | xfercap_log = readb(ioat_dma->reg_base + IOAT_XFERCAP_OFFSET); |
595 | xfercap_log &= 0x1f; /* bits [4:0] valid */ | 595 | xfercap_log &= 0x1f; /* bits [4:0] valid */ |
596 | if (xfercap_log == 0) | 596 | if (xfercap_log == 0) |
597 | return 0; | 597 | return; |
598 | dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log); | 598 | dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log); |
599 | 599 | ||
600 | for (i = 0; i < dma->chancnt; i++) { | 600 | for (i = 0; i < dma->chancnt; i++) { |
@@ -611,7 +611,6 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma) | |||
611 | } | 611 | } |
612 | } | 612 | } |
613 | dma->chancnt = i; | 613 | dma->chancnt = i; |
614 | return i; | ||
615 | } | 614 | } |
616 | 615 | ||
617 | /** | 616 | /** |
@@ -1205,8 +1204,15 @@ static void ioat_shutdown(struct pci_dev *pdev) | |||
1205 | 1204 | ||
1206 | spin_lock_bh(&ioat_chan->prep_lock); | 1205 | spin_lock_bh(&ioat_chan->prep_lock); |
1207 | set_bit(IOAT_CHAN_DOWN, &ioat_chan->state); | 1206 | set_bit(IOAT_CHAN_DOWN, &ioat_chan->state); |
1208 | del_timer_sync(&ioat_chan->timer); | ||
1209 | spin_unlock_bh(&ioat_chan->prep_lock); | 1207 | spin_unlock_bh(&ioat_chan->prep_lock); |
1208 | /* | ||
1209 | * Synchronization rule for del_timer_sync(): | ||
1210 | * - The caller must not hold locks which would prevent | ||
1211 | * completion of the timer's handler. | ||
1212 | * So prep_lock cannot be held before calling it. | ||
1213 | */ | ||
1214 | del_timer_sync(&ioat_chan->timer); | ||
1215 | |||
1210 | /* this should quiesce then reset */ | 1216 | /* this should quiesce then reset */ |
1211 | ioat_reset_hw(ioat_chan); | 1217 | ioat_reset_hw(ioat_chan); |
1212 | } | 1218 | } |