Lines Matching refs:rv
319 int rv = 0; in vcc_ldc_read() local
323 rv = ldc_rx_reset(vio->lp); in vcc_ldc_read()
324 vccdbg("VCC: reset rx q: rv=%d\n", rv); in vcc_ldc_read()
337 rv = ldc_read(vio->lp, &pkt, sizeof(pkt)); in vcc_ldc_read()
338 if (rv <= 0) in vcc_ldc_read()
341 vccdbg("VCC: ldc_read()=%d\n", rv); in vcc_ldc_read()
354 rv = -ECONNRESET; in vcc_ldc_read()
358 WARN_ON(rv != LDC_PACKET_SIZE); in vcc_ldc_read()
362 return rv; in vcc_ldc_read()
370 int rv; in vcc_rx_timer() local
382 rv = vcc_ldc_read(port); in vcc_rx_timer()
383 if (rv == -ECONNRESET) in vcc_rx_timer()
397 int rv; in vcc_tx_timer() local
414 rv = ldc_write(port->vio.lp, pkt, (VIO_TAG_SIZE + tosend)); in vcc_tx_timer()
415 WARN_ON(!rv); in vcc_tx_timer()
417 if (rv < 0) { in vcc_tx_timer()
418 vccdbg("VCC: ldc_write()=%d\n", rv); in vcc_tx_timer()
445 int rv; in vcc_event() local
459 rv = vcc_ldc_read(port); in vcc_event()
460 if (rv == -ECONNRESET) in vcc_event()
490 int rv; in vcc_sysfs_domain_show() local
496 rv = scnprintf(buf, PAGE_SIZE, "%s\n", port->domain); in vcc_sysfs_domain_show()
498 return rv; in vcc_sysfs_domain_show()
504 int rv; in vcc_send_ctl() local
510 rv = ldc_write(port->vio.lp, &pkt, sizeof(pkt.tag)); in vcc_send_ctl()
511 WARN_ON(!rv); in vcc_send_ctl()
512 vccdbg("VCC: ldc_write(%ld)=%d\n", sizeof(pkt.tag), rv); in vcc_send_ctl()
514 return rv; in vcc_send_ctl()
523 int rv = count; in vcc_sysfs_break_store() local
533 rv = -EINVAL; in vcc_sysfs_break_store()
539 return rv; in vcc_sysfs_break_store()
576 int rv; in vcc_probe() local
591 rv = vio_driver_init(&port->vio, vdev, VDEV_CONSOLE_CON, vcc_versions, in vcc_probe()
593 if (rv) in vcc_probe()
599 rv = vio_ldc_alloc(&port->vio, &vcc_ldc_cfg, port); in vcc_probe()
600 if (rv) in vcc_probe()
608 rv = -ENOMEM; in vcc_probe()
615 rv = PTR_ERR(dev); in vcc_probe()
623 rv = -ENXIO; in vcc_probe()
630 rv = -ENXIO; in vcc_probe()
638 rv = sysfs_create_group(&vdev->dev.kobj, &vcc_attribute_group); in vcc_probe()
639 if (rv) in vcc_probe()
668 return rv; in vcc_probe()
846 int rv = -EINVAL; in vcc_write() local
885 rv = ldc_write(port->vio.lp, pkt, (VIO_TAG_SIZE + tosend)); in vcc_write()
887 (VIO_TAG_SIZE + tosend), rv); in vcc_write()
891 if (rv < 0) { in vcc_write()
903 vccdbg("VCC: write: total=%d rv=%d", total_sent, rv); in vcc_write()
905 return total_sent ? total_sent : rv; in vcc_write()
1073 int rv; in vcc_tty_init() local
1092 rv = tty_register_driver(vcc_tty_driver); in vcc_tty_init()
1093 if (rv) { in vcc_tty_init()
1097 return rv; in vcc_tty_init()
1116 int rv; in vcc_init() local
1118 rv = vcc_tty_init(); in vcc_init()
1119 if (rv) { in vcc_init()
1121 return rv; in vcc_init()
1124 rv = vio_register_driver(&vcc_driver); in vcc_init()
1125 if (rv) { in vcc_init()
1132 return rv; in vcc_init()