svn commit: r354311 - head/sys/dev/ichiic
Vladimir Kondratyev
wulf at FreeBSD.org
Sun Nov 3 21:03:55 UTC 2019
Author: wulf
Date: Sun Nov 3 21:03:55 2019
New Revision: 354311
URL: https://svnweb.freebsd.org/changeset/base/354311
Log:
[ig4] Convert last remaining usage of TX_NOTFULL status to TX_EMPTY
in ig4iic_read routine. It makes possible interrupt utilization while
waiting for empty space in TX FIFO.
Modified:
head/sys/dev/ichiic/ig4_iic.c
Modified: head/sys/dev/ichiic/ig4_iic.c
==============================================================================
--- head/sys/dev/ichiic/ig4_iic.c Sun Nov 3 21:03:07 2019 (r354310)
+++ head/sys/dev/ichiic/ig4_iic.c Sun Nov 3 21:03:55 2019 (r354311)
@@ -337,14 +337,14 @@ ig4iic_read(ig4iic_softc_t *sc, uint8_t *buf, uint16_t
while (received < len) {
burst = sc->cfg.txfifo_depth -
(reg_read(sc, IG4_REG_TXFLR) & IG4_FIFOLVL_MASK);
- /* Ensure we have enough free space in RXFIFO */
- burst = MIN(burst, sc->cfg.rxfifo_depth - lowat);
if (burst <= 0) {
- error = wait_status(sc, IG4_STATUS_TX_NOTFULL);
+ error = wait_status(sc, IG4_STATUS_TX_EMPTY);
if (error)
break;
- burst = 1;
+ burst = sc->cfg.txfifo_depth;
}
+ /* Ensure we have enough free space in RXFIFO */
+ burst = MIN(burst, sc->cfg.rxfifo_depth - lowat);
target = MIN(requested + burst, (int)len);
while (requested < target) {
cmd = IG4_DATA_COMMAND_RD;
More information about the svn-src-head
mailing list