[IOAT]: ioatdma needs to to play nice in a multi-dma-client world

Now that the DMA engine has a multi-client interface, fix the ioatdma
driver to play along. At the same time, remove a couple of unnecessary
reads and writes.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Shannon Nelson and committed by
David S. Miller
e4223976 97a1ad43

+4 -14
+4 -14
drivers/dma/ioatdma.c
··· 191 191 int i; 192 192 LIST_HEAD(tmp_list); 193 193 194 - /* 195 - * In-use bit automatically set by reading chanctrl 196 - * If 0, we got it, if 1, someone else did 197 - */ 198 - chanctrl = readw(ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET); 199 - if (chanctrl & IOAT_CHANCTRL_CHANNEL_IN_USE) 200 - return -EBUSY; 194 + /* have we already been set up? */ 195 + if (!list_empty(&ioat_chan->free_desc)) 196 + return INITIAL_IOAT_DESC_COUNT; 201 197 202 198 /* Setup register to interrupt and write completion status on error */ 203 - chanctrl = IOAT_CHANCTRL_CHANNEL_IN_USE | 204 - IOAT_CHANCTRL_ERR_INT_EN | 199 + chanctrl = IOAT_CHANCTRL_ERR_INT_EN | 205 200 IOAT_CHANCTRL_ANY_ERR_ABORT_EN | 206 201 IOAT_CHANCTRL_ERR_COMPLETION_EN; 207 202 writew(chanctrl, ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET); ··· 277 282 in_use_descs - 1); 278 283 279 284 ioat_chan->last_completion = ioat_chan->completion_addr = 0; 280 - 281 - /* Tell hw the chan is free */ 282 - chanctrl = readw(ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET); 283 - chanctrl &= ~IOAT_CHANCTRL_CHANNEL_IN_USE; 284 - writew(chanctrl, ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET); 285 285 } 286 286 287 287 static struct dma_async_tx_descriptor *