Lines Matching refs:rv
310 int rv = 0; in vcc_ldc_read() local
314 rv = ldc_rx_reset(vio->lp); in vcc_ldc_read()
315 vccdbg("VCC: reset rx q: rv=%d\n", rv); in vcc_ldc_read()
328 rv = ldc_read(vio->lp, &pkt, sizeof(pkt)); in vcc_ldc_read()
329 if (rv <= 0) in vcc_ldc_read()
332 vccdbg("VCC: ldc_read()=%d\n", rv); in vcc_ldc_read()
345 rv = -ECONNRESET; in vcc_ldc_read()
349 WARN_ON(rv != LDC_PACKET_SIZE); in vcc_ldc_read()
353 return rv; in vcc_ldc_read()
361 int rv; in vcc_rx_timer() local
373 rv = vcc_ldc_read(port); in vcc_rx_timer()
374 if (rv == -ECONNRESET) in vcc_rx_timer()
388 int rv; in vcc_tx_timer() local
405 rv = ldc_write(port->vio.lp, pkt, (VIO_TAG_SIZE + tosend)); in vcc_tx_timer()
406 WARN_ON(!rv); in vcc_tx_timer()
408 if (rv < 0) { in vcc_tx_timer()
409 vccdbg("VCC: ldc_write()=%d\n", rv); in vcc_tx_timer()
436 int rv; in vcc_event() local
450 rv = vcc_ldc_read(port); in vcc_event()
451 if (rv == -ECONNRESET) in vcc_event()
481 int rv; in domain_show() local
487 rv = scnprintf(buf, PAGE_SIZE, "%s\n", port->domain); in domain_show()
489 return rv; in domain_show()
495 int rv; in vcc_send_ctl() local
501 rv = ldc_write(port->vio.lp, &pkt, sizeof(pkt.tag)); in vcc_send_ctl()
502 WARN_ON(!rv); in vcc_send_ctl()
503 vccdbg("VCC: ldc_write(%ld)=%d\n", sizeof(pkt.tag), rv); in vcc_send_ctl()
505 return rv; in vcc_send_ctl()
514 int rv = count; in break_store() local
524 rv = -EINVAL; in break_store()
530 return rv; in break_store()
567 int rv; in vcc_probe() local
582 rv = vio_driver_init(&port->vio, vdev, VDEV_CONSOLE_CON, vcc_versions, in vcc_probe()
584 if (rv) in vcc_probe()
590 rv = vio_ldc_alloc(&port->vio, &vcc_ldc_cfg, port); in vcc_probe()
591 if (rv) in vcc_probe()
599 rv = -ENOMEM; in vcc_probe()
606 rv = PTR_ERR(dev); in vcc_probe()
614 rv = -ENXIO; in vcc_probe()
621 rv = -ENXIO; in vcc_probe()
629 rv = sysfs_create_group(&vdev->dev.kobj, &vcc_attribute_group); in vcc_probe()
630 if (rv) in vcc_probe()
659 return rv; in vcc_probe()
814 int rv = -EINVAL; in vcc_write() local
848 rv = ldc_write(port->vio.lp, pkt, (VIO_TAG_SIZE + tosend)); in vcc_write()
850 (VIO_TAG_SIZE + tosend), rv); in vcc_write()
854 if (rv < 0) { in vcc_write()
866 vccdbg("VCC: write: total=%d rv=%d", total_sent, rv); in vcc_write()
868 return total_sent ? total_sent : rv; in vcc_write()
1011 int rv; in vcc_tty_init() local
1028 rv = tty_register_driver(vcc_tty_driver); in vcc_tty_init()
1029 if (rv) { in vcc_tty_init()
1033 return rv; in vcc_tty_init()
1052 int rv; in vcc_init() local
1054 rv = vcc_tty_init(); in vcc_init()
1055 if (rv) { in vcc_init()
1057 return rv; in vcc_init()
1060 rv = vio_register_driver(&vcc_driver); in vcc_init()
1061 if (rv) { in vcc_init()
1068 return rv; in vcc_init()