Lines Matching defs:rv

350 	int	    rv;
386 rv = cv_wait_sig(cv, &vport->lock);
387 if (rv == 0) {
413 int rv = EIO;
424 if ((rv = ldc_init(vport->ldc_id, &attr, &(vport->ldc_handle))) != 0) {
426 " failed ldc_init %d \n", vport->number, vport->ldc_id, rv);
428 return (rv);
432 if ((rv = ldc_reg_callback(vport->ldc_handle, vcc_ldc_cb,
438 return (rv);
442 if ((rv = ldc_open(vport->ldc_handle)) != 0) {
448 return (rv);
452 if ((rv = ldc_status(vport->ldc_handle, &vport->ldc_status)) != 0) {
459 return (rv);
469 int rv = EIO;
480 rv = i_vcc_wait_port_status(vport, &vport->write_cv,
483 if (rv == 0) {
504 rv = i_vcc_wait_port_status(vport, &vport->read_cv,
507 if (rv == 0) {
511 rv = i_vcc_read_ldc(vport, (char *)&buf, &sz);
512 } while (rv == 0 && sz > 0);
526 while ((rv = ldc_close(vport->ldc_handle)) == EAGAIN) {
537 if (rv == 0) {
560 int rv;
577 rv = ldc_read(vport->ldc_handle, (caddr_t)&buf, &size);
579 if (rv) {
580 return (rv);
680 int rv = EIO;
710 if ((rv = i_vcc_ldc_init(vccp, vport)) != 0) {
712 return (rv);
735 int rv = MDEG_FAILURE;
813 rv = ddi_create_minor_node(vccp->dip, name, S_IFCHR, minor,
816 if (rv != DDI_SUCCESS) {
835 int rv;
848 rv = i_vcc_close_port(vport);
861 return (rv);
874 int rv;
894 rv = mdeg_register(ispecp, &vcc_port_match, vcc_mdeg_cb,
897 if (rv != MDEG_SUCCESS) {
899 "mdeg_register failed (%d)\n", rv);
935 int rv = DDI_FAILURE;
984 rv = ddi_create_minor_node(vccp->dip, "ctl", S_IFCHR, minor,
989 if (rv != DDI_SUCCESS) {
1031 rv = i_vcc_mdeg_register(vccp, inst);
1032 if (rv != MDEG_SUCCESS) {
1143 int rv = EIO;
1178 if ((rv = i_vcc_can_use_port(VCCMINORP(vccp, minor),
1181 return (rv);
1202 rv = i_vcc_ldc_init(vccp, vport);
1203 if (rv) {
1262 int rv = EIO;
1299 rv = i_vcc_reset_events(vccp);
1305 if ((rv = i_vcc_can_use_port(VCCMINORP(vccp, minor),
1308 return (rv);
1311 rv = i_vcc_close_port(vport);
1314 return (rv);
1616 int rv;
1637 rv = i_vcc_close_port(vport);
1643 return (rv);
1746 int rv = EIO;
1755 rv = ldc_write(vport->ldc_handle, (caddr_t)buf, &size);
1758 vport->number, rv, size);
1760 if (rv == 0) {
1761 return (rv);
1764 if (rv != EWOULDBLOCK) {
1774 rv = i_vcc_wait_port_status(vport, &vport->write_cv,
1777 if (rv) {
1778 return (rv);
1798 int rv;
1818 if ((rv = i_vcc_can_use_port(VCCMINORP(vccp, minor),
1821 return (rv);
1841 if ((rv = i_vcc_can_use_port(VCCMINORP(vccp, minor),
1844 return (rv);
1858 if ((rv = i_vcc_can_use_port(VCCMINORP(vccp, minor),
1861 return (rv);
1865 rv = i_vcc_wait_port_status(vport, &vport->write_cv,
1867 if (rv) {
1869 return (rv);
1878 rv = i_vcc_write_ldc(vport, &buf);
1895 if ((rv = i_vcc_can_use_port(VCCMINORP(vccp, minor),
1898 return (rv);
1997 int rv = EIO; /* by default fail ! */
2030 if ((rv = i_vcc_can_use_port(VCCMINORP(vccp, minor),
2033 return (rv);
2036 rv = i_vcc_wait_port_status(vport, &vport->read_cv,
2039 if (rv) {
2041 return (rv);
2051 rv = i_vcc_read_ldc(vport, buf, &size);
2054 if (rv == EAGAIN) {
2060 } else if (rv) {
2078 rv = i_vcc_wait_port_status(vport, &vport->read_cv,
2081 if (rv) {
2090 if ((rv == 0) && (size > 0)) {
2092 rv = uiomove(buf, size, UIO_READ, uiop);
2098 return (rv);
2116 int rv = EIO;
2144 if ((rv = i_vcc_can_use_port(VCCMINORP(vccp, minor),
2147 return (rv);
2150 rv = i_vcc_wait_port_status(vport, &vport->write_cv,
2153 if (rv) {
2155 return (rv);
2173 rv = uiomove(&(buf.data), bytes, UIO_WRITE, uiop);
2175 if (rv) {
2185 if ((rv = i_vcc_can_use_port(VCCMINORP(vccp, minor),
2188 return (rv);
2191 rv = i_vcc_write_ldc(vport, &buf);
2195 if (rv) {
2204 return (rv);
2212 int rv = MDEG_FAILURE;
2237 rv = i_vcc_delete_port(vccp, vport);
2244 return (rv ? MDEG_FAILURE : MDEG_SUCCESS);
2380 int rv;
2393 rv = i_vcc_md_add_port(resp->added.mdp,
2396 if (rv != MDEG_SUCCESS) {
2397 return (rv);
2405 rv = i_vcc_md_remove_port(resp->removed.mdp,
2408 if (rv != MDEG_SUCCESS) {
2409 return (rv);