Lines Matching refs:sit
387 spi_ioctl_transfer_t *sit;
408 sit = (spi_ioctl_transfer_t *)data;
409 if (sit->sit_addr < 0 || sit->sit_addr >= sc->sc_nslaves) {
413 if ((sit->sit_send && sit->sit_sendlen == 0)
414 || (sit->sit_recv && sit->sit_recvlen == 0)) {
418 sh = &sc->sc_slaves[sit->sit_addr];
421 if (sit->sit_send && sit->sit_sendlen <= SPI_MAXDATA) {
422 sbuf = malloc(sit->sit_sendlen, M_DEVBUF, M_WAITOK);
423 error = copyin(sit->sit_send, sbuf, sit->sit_sendlen);
425 if (sit->sit_recv && sit->sit_recvlen <= SPI_MAXDATA) {
426 rbuf = malloc(sit->sit_recvlen, M_DEVBUF, M_WAITOK);
431 sit->sit_sendlen, sbuf,
432 sit->sit_recvlen, rbuf);
435 sit->sit_sendlen, sbuf);
438 sit->sit_recvlen, rbuf);
442 error = copyout(rbuf, sit->sit_recv,
443 sit->sit_recvlen);