}
}
if (s->chr.chr) {
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
bcm2835_aux_update(s);
return c;
s->rx_wpos = 0;
s->rx_count = 0;
if (s->chr.chr) {
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
}
s->rx_count--;
if (s->chr.chr) {
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
} else {
*c = 0;
ret = s->rx;
trace_escc_mem_readb_data(CHN_C(s), ret);
if (s->chr.chr) {
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
return ret;
default:
s->uts1 |= UTS1_RXEMPTY;
imx_update(s);
if (s->chr.chr) {
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
}
return c;
if (value & UCR2_RXEN) {
if (!(s->ucr2 & UCR2_RXEN)) {
if (s->chr.chr) {
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
}
}
ch->sr &= ~SR_RXRDY;
blk->isr &= ~ISR_RXRDY(channel);
if (ch->dev.chr) {
- qemu_chr_accept_input(ch->dev.chr);
+ qemu_chr_fe_accept_input(ch->dev.chr);
}
} else {
ch->rhr_idx = (ch->rhr_idx + 1) % RX_FIFO_SIZE;
r = s->regs[R_RXTX];
s->regs[R_LSR] &= ~LSR_DR;
uart_update_irq(s);
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
break;
case R_IIR:
case R_LSR:
if (s->fifo_len == 0)
s->sr &= ~MCF_UART_RxRDY;
mcf_uart_update(s);
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
return val;
}
case 0x10:
case R_STAT:
/* write one to clear bits */
s->regs[addr] &= ~(value & (STAT_RX_EVT | STAT_TX_EVT));
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
break;
default:
s->rsr = c >> 8;
pl011_update(s);
if (s->chr.chr) {
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
r = c;
break;
serial_update_irq(s);
if (!(s->mcr & UART_MCR_LOOP)) {
/* in loopback mode, don't receive any data */
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
}
break;
buf[n++] = dev->buf[dev->out++ % VTERM_BUFSIZE];
}
- qemu_chr_accept_input(dev->chardev.chr);
+ qemu_chr_fe_accept_input(dev->chardev.chr);
return n;
}
retvalue = s->usart_sr;
s->usart_sr &= ~USART_SR_TC;
if (s->chr.chr) {
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
return retvalue;
case USART_DR:
s->usart_sr |= USART_SR_TXE;
s->usart_sr &= ~USART_SR_RXNE;
if (s->chr.chr) {
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
}
qemu_set_irq(s->irq, 0);
return s->usart_dr & 0x3FF;
VirtConsole *vcon = VIRTIO_CONSOLE(port);
if (vcon->chr.chr) {
- qemu_chr_accept_input(vcon->chr.chr);
+ qemu_chr_fe_accept_input(vcon->chr.chr);
}
}
s->rx_fifo_len--;
uart_update_status(s);
uart_update_irq(s);
- qemu_chr_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(s->chr.chr);
break;
default:
/**
- * @qemu_chr_disconnect:
+ * @qemu_chr_fe_disconnect:
*
* Close a fd accpeted by character backend.
*/
-void qemu_chr_disconnect(CharDriverState *chr);
+void qemu_chr_fe_disconnect(CharDriverState *chr);
/**
* @qemu_chr_cleanup:
GMainContext *context);
void qemu_chr_be_generic_open(CharDriverState *s);
-void qemu_chr_accept_input(CharDriverState *s);
+void qemu_chr_fe_accept_input(CharDriverState *s);
int qemu_chr_add_client(CharDriverState *s, int fd);
CharDriverState *qemu_chr_find(const char *name);
bool chr_is_ringbuf(const CharDriverState *chr);
{
VhostUserState *s = opaque;
- qemu_chr_disconnect(s->chr.chr);
+ qemu_chr_fe_disconnect(s->chr.chr);
return FALSE;
}
s->watch = qemu_chr_fe_add_watch(s->chr.chr, G_IO_HUP,
net_vhost_user_watch, s);
if (vhost_user_start(queues, ncs) < 0) {
- qemu_chr_disconnect(s->chr.chr);
+ qemu_chr_fe_disconnect(s->chr.chr);
return;
}
qmp_set_link(name, true, &err);
return s->chr_add_client ? s->chr_add_client(s, fd) : -1;
}
-void qemu_chr_accept_input(CharDriverState *s)
+void qemu_chr_fe_accept_input(CharDriverState *s)
{
if (s->chr_accept_input)
s->chr_accept_input(s);
s->avail_connections++;
}
-void qemu_chr_disconnect(CharDriverState *chr)
+void qemu_chr_fe_disconnect(CharDriverState *chr)
{
if (chr->chr_disconnect) {
chr->chr_disconnect(chr);
int fd;
if (s->test_fail) {
- qemu_chr_disconnect(chr->chr);
+ qemu_chr_fe_disconnect(chr->chr);
/* now switch to non-failure */
s->test_fail = false;
}
g_assert_cmpint(msg.payload.u64 & (0x1ULL << VHOST_USER_F_PROTOCOL_FEATURES),
!=, 0ULL);
if (s->test_flags == TEST_FLAGS_DISCONNECT) {
- qemu_chr_disconnect(chr->chr);
+ qemu_chr_fe_disconnect(chr->chr);
s->test_flags = TEST_FLAGS_BAD;
}
break;
{
TestServer *s = user_data;
- qemu_chr_disconnect(s->chr.chr);
+ qemu_chr_fe_disconnect(s->chr.chr);
return FALSE;
}