|
@@ -344,12 +344,14 @@ static void bitbang_work(struct work_struct *work)
|
|
t->rx_dma = t->tx_dma = 0;
|
|
t->rx_dma = t->tx_dma = 0;
|
|
status = bitbang->txrx_bufs(spi, t);
|
|
status = bitbang->txrx_bufs(spi, t);
|
|
}
|
|
}
|
|
|
|
+ if (status > 0)
|
|
|
|
+ m->actual_length += status;
|
|
if (status != t->len) {
|
|
if (status != t->len) {
|
|
- if (status > 0)
|
|
|
|
- status = -EMSGSIZE;
|
|
|
|
|
|
+ /* always report some kind of error */
|
|
|
|
+ if (status >= 0)
|
|
|
|
+ status = -EREMOTEIO;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- m->actual_length += status;
|
|
|
|
status = 0;
|
|
status = 0;
|
|
|
|
|
|
/* protocol tweaks before next transfer */
|
|
/* protocol tweaks before next transfer */
|