Lines Matching defs:fcio

1434 		fcio_t	fcio;
1446 fcio.fcio_xfer = fcio32.fcio_xfer;
1447 fcio.fcio_cmd = fcio32.fcio_cmd;
1448 fcio.fcio_flags = fcio32.fcio_flags;
1449 fcio.fcio_cmd_flags = fcio32.fcio_cmd_flags;
1450 fcio.fcio_ilen = (size_t)fcio32.fcio_ilen;
1451 fcio.fcio_ibuf = (caddr_t)(long)fcio32.fcio_ibuf;
1452 fcio.fcio_olen = (size_t)fcio32.fcio_olen;
1453 fcio.fcio_obuf = (caddr_t)(long)fcio32.fcio_obuf;
1454 fcio.fcio_alen = (size_t)fcio32.fcio_alen;
1455 fcio.fcio_abuf = (caddr_t)(long)fcio32.fcio_abuf;
1456 fcio.fcio_errno = fcio32.fcio_errno;
1461 if (status = ddi_copyin((void *)arg, (void *)&fcio,
1468 if (status = ddi_copyin((void *)arg, (void *)&fcio,
1475 retval = fcsm_fciocmd(arg, mode, credp, &fcio);
1500 fcsm_fciocmd(intptr_t arg, int mode, cred_t *credp, fcio_t *fcio)
1504 switch (fcio->fcio_cmd) {
1511 if ((fcio->fcio_xfer != FCIO_XFER_RW) ||
1512 (fcio->fcio_ilen == 0) || (fcio->fcio_ibuf == 0) ||
1513 (fcio->fcio_olen == 0) || (fcio->fcio_obuf == 0) ||
1514 (fcio->fcio_alen == 0) || (fcio->fcio_abuf == 0) ||
1515 (fcio->fcio_flags != 0) || (fcio->fcio_cmd_flags != 0) ||
1516 (fcio->fcio_ilen > FCSM_MAX_CT_SIZE) ||
1517 (fcio->fcio_olen > FCSM_MAX_CT_SIZE) ||
1518 (fcio->fcio_alen > MAXPATHLEN)) {
1528 abuf = kmem_zalloc(fcio->fcio_alen, KM_SLEEP);
1530 if (ddi_copyin(fcio->fcio_abuf, abuf, fcio->fcio_alen, mode)) {
1532 kmem_free(abuf, fcio->fcio_alen);
1537 kmem_free(abuf, fcio->fcio_alen);
1581 req_iu = kmem_zalloc(fcio->fcio_ilen, KM_SLEEP);
1582 rsp_iu = kmem_zalloc(fcio->fcio_olen, KM_SLEEP);
1585 if (ddi_copyin(fcio->fcio_ibuf, req_iu,
1586 fcio->fcio_ilen, mode)) {
1588 kmem_free(req_iu, fcio->fcio_ilen);
1589 kmem_free(rsp_iu, fcio->fcio_olen);
1593 user_ibuf = fcio->fcio_ibuf;
1594 user_obuf = fcio->fcio_obuf;
1595 fcio->fcio_ibuf = req_iu;
1596 fcio->fcio_obuf = rsp_iu;
1598 status = fcsm_ct_passthru(fcsm->sm_instance, fcio, KM_SLEEP,
1606 fcio->fcio_cmd, status));
1607 fcio->fcio_errno = status;
1608 fcio->fcio_ibuf = user_ibuf;
1609 fcio->fcio_obuf = user_obuf;
1611 if (ddi_copyout(rsp_iu, fcio->fcio_obuf,
1612 fcio->fcio_olen, mode)) {
1614 kmem_free(req_iu, fcio->fcio_ilen);
1615 kmem_free(rsp_iu, fcio->fcio_olen);
1619 kmem_free(req_iu, fcio->fcio_ilen);
1620 kmem_free(rsp_iu, fcio->fcio_olen);
1622 if (fcsm_fcio_copyout(fcio, arg, mode)) {
1632 if ((fcio->fcio_xfer != FCIO_XFER_RW) ||
1633 (fcio->fcio_olen == 0) || (fcio->fcio_obuf == 0)) {
1638 list = kmem_zalloc(fcio->fcio_olen, KM_SLEEP);
1640 if (ddi_copyin(fcio->fcio_obuf, list, fcio->fcio_olen, mode)) {
1646 if (fcio->fcio_olen < MAXPATHLEN * list->numAdapters) {
1658 kmem_free(list, fcio->fcio_olen);
1663 if (ddi_copyout(list, fcio->fcio_obuf,
1664 fcio->fcio_olen, mode)) {
1667 kmem_free(list, fcio->fcio_olen);
1673 "fciocmd: unknown cmd <0x%x>", fcio->fcio_cmd));
1682 fcsm_fcio_copyout(fcio_t *fcio, intptr_t arg, int mode)
1691 fcio32.fcio_xfer = fcio->fcio_xfer;
1692 fcio32.fcio_cmd = fcio->fcio_cmd;
1693 fcio32.fcio_flags = fcio->fcio_flags;
1694 fcio32.fcio_cmd_flags = fcio->fcio_cmd_flags;
1695 fcio32.fcio_ilen = fcio->fcio_ilen;
1696 fcio32.fcio_ibuf = (caddr32_t)(long)fcio->fcio_ibuf;
1697 fcio32.fcio_olen = fcio->fcio_olen;
1698 fcio32.fcio_obuf = (caddr32_t)(long)fcio->fcio_obuf;
1699 fcio32.fcio_alen = fcio->fcio_alen;
1700 fcio32.fcio_abuf = (caddr32_t)(long)fcio->fcio_abuf;
1701 fcio32.fcio_errno = fcio->fcio_errno;
1708 status = ddi_copyout((void *)fcio, (void *)arg,
1713 status = ddi_copyout((void *)fcio, (void *)arg, sizeof (fcio_t), mode);
2773 fcio_t *fcio;
2780 fcio = job->job_arg;
2781 ASSERT(fcio != NULL);
2786 ((fc_ct_aiu_t *)fcio->fcio_ibuf)->aiu_header.ct_cmdrsp,
2791 FCSM_REP_RD(pkt->pkt_resp_acc, fcio->fcio_obuf,
2792 pkt->pkt_resp, fcio->fcio_olen);
2808 fcio_t *fcio;
2835 fcio = job->job_arg;
2836 ASSERT(fcio != NULL);
2842 ct_header = (fc_ct_header_t *)fcio->fcio_ibuf;
2911 cmd = fcsm_alloc_cmd(fcsm, fcio->fcio_ilen, fcio->fcio_olen, KM_SLEEP);
2921 fcsm_ct_init(fcsm, cmd, (fc_ct_aiu_t *)fcio->fcio_ibuf, fcio->fcio_ilen,
3219 fcsm_ct_passthru(int instance, fcio_t *fcio, int sleep, int job_flags,
3226 "ct_passthru: instance 0x%x fcio 0x%p", instance, fcio));
3231 (opaque_t)fcio, (opaque_t)func, fcsm_ct_passthru_comp, NULL);