瀏覽代碼

NFC: trf7970a: Reset FIFO when 'End of TX' Interrupt Occurs

Sometimes after sending a frame there is tx data leftover in the FIFO
which the driver will think is part of the receive frame. That data can
be cleared when an 'End of TX' interrupt is received by issuing the
'FIFO Reset' command.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Mark A. Greer 11 年之前
父節點
當前提交
4dd836e46c
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/nfc/trf7970a.c

+ 3 - 1
drivers/nfc/trf7970a.c

@@ -681,7 +681,9 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id)
 			trf->ignore_timeout =
 				!cancel_delayed_work(&trf->timeout_work);
 			trf7970a_drain_fifo(trf, status);
-		} else if (!(status & TRF7970A_IRQ_STATUS_TX)) {
+		} else if (status == TRF7970A_IRQ_STATUS_TX) {
+			trf7970a_cmd(trf, TRF7970A_CMD_FIFO_RESET);
+		} else {
 			trf7970a_send_err_upstream(trf, -EIO);
 		}
 		break;