提交 3faf5643 编写于 作者: W Walter Mack 提交者: Marcel Holtmann

mrf24j40: avoid uninitialized byte in SPI transfer to radio.

isr function issues SPI read command to mrf to obtain INTSTAT.
SPI transfer is 2 bytes, but value of 2nd byte is not defined.
This had the effect that only the first ISR worked as intended. The
second ISR read incorrect INTSTAT values. Observed on Raspberry PI B+.
Signed-off-by: NWalter Mack <wmack@componentsw.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 12d86896
......@@ -1054,6 +1054,8 @@ static irqreturn_t mrf24j40_isr(int irq, void *data)
disable_irq_nosync(irq);
devrec->irq_buf[0] = MRF24J40_READSHORT(REG_INTSTAT);
devrec->irq_buf[1] = 0;
/* Read the interrupt status */
ret = spi_async(devrec->spi, &devrec->irq_msg);
if (ret) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册