aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memstick/host/tifm_ms.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/memstick/host/tifm_ms.c')
-rw-r--r--drivers/memstick/host/tifm_ms.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c
index 2b5bf52a8302..eb150dfb637f 100644
--- a/drivers/memstick/host/tifm_ms.c
+++ b/drivers/memstick/host/tifm_ms.c
@@ -340,11 +340,20 @@ static void tifm_ms_complete_cmd(struct tifm_ms *host)
340 340
341 del_timer(&host->timer); 341 del_timer(&host->timer);
342 342
343 if (host->use_dma) 343 host->req->int_reg = readl(sock->addr + SOCK_MS_STATUS) & 0xff;
344 host->req->int_reg = (host->req->int_reg & 1)
345 | ((host->req->int_reg << 4) & 0xe0);
346
347 writel(TIFM_FIFO_INT_SETALL,
348 sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR);
349 writel(TIFM_DMA_RESET, sock->addr + SOCK_DMA_CONTROL);
350
351 if (host->use_dma) {
344 tifm_unmap_sg(sock, &host->req->sg, 1, 352 tifm_unmap_sg(sock, &host->req->sg, 1,
345 host->req->data_dir == READ 353 host->req->data_dir == READ
346 ? PCI_DMA_FROMDEVICE 354 ? PCI_DMA_FROMDEVICE
347 : PCI_DMA_TODEVICE); 355 : PCI_DMA_TODEVICE);
356 }
348 357
349 writel((~TIFM_CTRL_LED) & readl(sock->addr + SOCK_CONTROL), 358 writel((~TIFM_CTRL_LED) & readl(sock->addr + SOCK_CONTROL),
350 sock->addr + SOCK_CONTROL); 359 sock->addr + SOCK_CONTROL);
@@ -424,12 +433,6 @@ static void tifm_ms_card_event(struct tifm_dev *sock)
424 else if (host_status & TIFM_MS_STAT_CRC) 433 else if (host_status & TIFM_MS_STAT_CRC)
425 host->req->error = -EILSEQ; 434 host->req->error = -EILSEQ;
426 435
427 if (host->req->error) {
428 writel(TIFM_FIFO_INT_SETALL,
429 sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR);
430 writel(TIFM_DMA_RESET, sock->addr + SOCK_DMA_CONTROL);
431 }
432
433 if (host_status & TIFM_MS_STAT_RDY) 436 if (host_status & TIFM_MS_STAT_RDY)
434 host->cmd_flags |= CMD_READY; 437 host->cmd_flags |= CMD_READY;
435 438