The trf7970a occasionally generates spurious interrupts
which can confuse the driver. To help alleviate this,
clear any interrupts by reading the 'IRQ Status Register'
before starting a new transaction.
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
char *prefix;
unsigned int len;
int ret;
+ u8 status;
dev_dbg(trf->dev, "New request - state: %d, timeout: %d ms, len: %d\n",
trf->state, timeout, skb->len);
len = min_t(int, skb->len, TRF7970A_FIFO_SIZE);
+ /* Clear possible spurious interrupt */
+ ret = trf7970a_read_irqstatus(trf, &status);
+ if (ret)
+ goto out_err;
+
ret = trf7970a_transmit(trf, skb, len);
if (ret) {
kfree_skb(trf->rx_skb);