svn commit: r283766 - in head: share/man/man4 sys/conf sys/dev/ichiic sys/modules/i2c/controllers sys/modules/i2c/controllers/ichiic
Konstantin Belousov
kostikbel at gmail.com
Sat May 30 15:58:28 UTC 2015
On Sat, May 30, 2015 at 12:17:19PM +0000, Michael Gmelin wrote:
> + if ((op & SMB_TRANS_NOCMD) == 0) {
> + error = wait_status(sc, IG4_STATUS_TX_NOTFULL);
> + if (error)
> + goto done;
> + last |= (u_char)cmd;
> + if (wcount == 0 && rcount == 0 && (op & SMB_TRANS_NOSTOP) == 0)
> + last |= IG4_DATA_STOP;
> + reg_write(sc, IG4_REG_DATA_CMD, last);
> + last = 0;
> + }
I asked this question in the review, but it was seemingly ignored.
What is the purpose of the sc->mutex lock ? What kinds of the parallel
execution does it prevent ?
The mutex is dropped when doing a transfer, in the wait_status().
Is there something external which prevents parallel transfer initiation ?
If yes, why is the sc->mutex needed ? If not, what prevents the
parallel transfers to stomp on each other ?
More information about the svn-src-head
mailing list